From 9ada2f554ae108813df83c7ebc97b5aa78482a93 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 11 Sep 2011 13:49:07 -0400 Subject: [PATCH] Bug - The modify command no longer claims that a task was modified if no changes were applied. --- src/TDB2.cpp | 43 ++++++++++++++++++++------------------ src/Task.cpp | 5 +---- src/commands/CmdModify.cpp | 3 ++- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 786cdcef9..66548b0a2 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -551,29 +551,32 @@ void TDB2::modify (Task& task) Task original; get (task.get ("uuid"), original); - std::string status = original.get ("status"); - if (status == "pending" || - status == "waiting" || - status == "recurring") + if (taskDiff (original, task)) { - pending.modify_task (task); - } - else - { - completed.modify_task (task); - } + std::string status = original.get ("status"); + if (status == "pending" || + status == "waiting" || + status == "recurring") + { + pending.modify_task (task); + } + else + { + completed.modify_task (task); + } - // time