-rw-r--r-- | libkcal/todo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 2201814..cc1c5ae 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -103,24 +103,26 @@ void Todo::setRunning( bool run ) if ( mRunning ) { restartSaveTimer( SAVETIMER_TIMEOUT_SECONDS ); mRunStart = QDateTime::currentDateTime(); } else { mRunSaveTimer->stop(); saveRunningInfoToFile(); } mLastSavedFileName = ""; } void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end ) { if ( !mRunning) return; + if ( mRunSaveTimer ) + mRunSaveTimer->stop(); mRunning = false; mRunStart = start; mRunEnd = end; saveRunningInfoToFile( comment ); } void Todo::restartSaveTimer( int secs ) { mRunSaveTimer->start( secs * 1000 ); mRunLastSave = QDateTime::currentDateTime(); mCurrentTimerDelay = secs; } void Todo::timerSlotSaveRunningInfoToFile() |