From 5105bd05f9890c444d5217ec114b481248d660fb Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Fri, 5 Jun 2015 23:57:48 +0200 Subject: [PATCH] TW-1454: Redundant dependency should not stop modification --- ChangeLog | 2 ++ src/Task.cpp | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3725ea5e7..1281a7e17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ Harlan). - TW-1440 "task import" from STDIN (thanks to Renato Alves). - TW-1432 start/stop can be issued on completed tasks (thanks to Renato Alves). +- TW-1454 Redundant dependency should not stop modification (thanks to Tomas +Babej). - TW-1572 Better urgency inheritance (thanks to Jens Erat). - Prevent potential task duplication during import for non-pending tasks. - Show the active context in "context list", if any is active. diff --git a/src/Task.cpp b/src/Task.cpp index b7b64e753..6d7863477 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -980,7 +980,10 @@ void Task::addDependency (int id) std::string depends = get ("depends"); if (depends.find (uuid) != std::string::npos) - throw format (STRING_TASK_DEPEND_DUP, this->id, id); + { + context.footnote (format (STRING_TASK_DEPEND_DUP, this->id, id)); + return; + } addDependency(uuid); } @@ -999,7 +1002,10 @@ void Task::addDependency (const std::string& uuid) if (depends.find (uuid) == std::string::npos) set ("depends", depends + "," + uuid); else - throw format (STRING_TASK_DEPEND_DUP, this->get ("uuid"), uuid); + { + context.footnote (format (STRING_TASK_DEPEND_DUP, this->get ("uuid"), uuid)); + return; + } } else set ("depends", uuid);