summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 01cf0ff..395325c 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -199,16 +199,20 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
}
else {
qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable ");
e->ignore();
}
}
#endif
}
+void KOTodoListView::wheelEvent (QWheelEvent *e)
+{
+ QListView::wheelEvent (e);
+}
void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
{
QPoint p(contentsToViewport(e->pos()));
QListViewItem *i = itemAt(p);
bool rootClicked = true;
if (i) {
@@ -222,19 +226,21 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
X < header()->sectionPos(0)) {
rootClicked = false;
}
} else {
rootClicked = false;
}
#ifndef KORG_NODND
mMousePressed = false;
- if (! rootClicked ) {
+ if (! rootClicked && !( e->button() == RightButton) ) {
mPressPos = e->pos();
mMousePressed = true;
+ } else {
+ mMousePressed = false;
}
#endif
//qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked);
#ifndef DESKTOP_VERSION
if (!( e->button() == RightButton && rootClicked) )
QListView::contentsMousePressEvent(e);
#else
QListView::contentsMousePressEvent(e);
@@ -1077,17 +1083,17 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
}
pendingSubtodo = 0;
int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
//qDebug("ROW %d ", row);
if (!item) {
newTodo();
return;
} else {
- if ( row == 1 ) {
+ if ( row == 1 || row == 2 ) {
mActiveItem = (KOTodoViewItem *) item;
newSubTodo();
return;
}
}
if ( KOPrefs::instance()->mEditOnDoubleClick )
editItem( item );
else
@@ -1266,16 +1272,17 @@ void KOTodoView::setAllFlat()
storeCurrentItem();
displayAllFlat();
resetCurrentItem();
}
void KOTodoView::purgeCompleted()
{
emit purgeCompletedSignal();
+
}
void KOTodoView::toggleQuickTodo()
{
if ( mQuickAdd->isVisible() ) {
mQuickAdd->hide();
KOPrefs::instance()->mEnableQuickTodo = false;
}
else {