-rw-r--r-- | libkcal/todo.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 3d2de61..7362bdf 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -288,7 +288,10 @@ bool Todo::isCompleted() const | |||
288 | void Todo::setCompleted(bool completed) | 288 | void Todo::setCompleted(bool completed) |
289 | { | 289 | { |
290 | if (completed) mPercentComplete = 100; | 290 | if (completed) mPercentComplete = 100; |
291 | else mPercentComplete = 0; | 291 | else { |
292 | mPercentComplete = 0; | ||
293 | mHasCompletedDate = false; | ||
294 | } | ||
292 | updated(); | 295 | updated(); |
293 | } | 296 | } |
294 | 297 | ||
@@ -323,6 +326,8 @@ int Todo::percentComplete() const | |||
323 | void Todo::setPercentComplete(int v) | 326 | void Todo::setPercentComplete(int v) |
324 | { | 327 | { |
325 | mPercentComplete = v; | 328 | mPercentComplete = v; |
329 | if ( v != 100 ) | ||
330 | mHasCompletedDate = false; | ||
326 | updated(); | 331 | updated(); |
327 | } | 332 | } |
328 | QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const | 333 | QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const |