summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 98c9bd9..8d957eb 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1180,15 +1180,28 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
newTodo();
return;
} else {
- if ( row == 2 || row == 1 ) {
+ if ( row == 1 ) {
mActiveItem = (KOTodoViewItem *) item;
newSubTodo();
return;
}
- if ( row == 5 || row == 6 ) {
+ if ( row == 5 || row == 6 || row == 2) {
mActiveItem = (KOTodoViewItem *) item;
- toggleRunningItem();
- return;
+ Todo * t = mActiveItem->todo();
+ if ( t->isRunning() ) {
+ if ( t->runTime() < 15) {
+ t->stopRunning();
+ mActiveItem->construct();
+ return;
+ }
+ else
+ toggleRunningItem();
+ return;
+ } else {
+ t->setRunning( true );
+ mActiveItem->construct();
+ return;
+ }
}
}
if ( KOPrefs::instance()->mEditOnDoubleClick )