From eb09df0e6a0a48e14b67671a121c771d5f221df5 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 28 Feb 2016 11:09:00 -0500 Subject: [PATCH] TD-64: sync conflict deleted all annotations of the task - Thanks to Markus Beppler, Konstantin Vorobyev. --- AUTHORS | 2 +- ChangeLog | 2 ++ src/Task.cpp | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 32b8d3752..1e2e01e2c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -126,7 +126,7 @@ The following submitted code, packages or analysis, and deserve special thanks: Sunil Joshi Misty De Meo Kent R. Spillner - Konstantin + Konstantin Vorobyev Thanks to the following, who submitted detailed bug reports and excellent suggestions: diff --git a/ChangeLog b/ChangeLog index e61c55b83..6d03e9694 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2.6.0 () - +- TD-64 sync conflict deleted all annotations of the task + (thanks to Markus Beppler, Konstantin Vorobyev). - Removed deprecated 'alias._query' setting. ------ current release --------------------------- diff --git a/src/Task.cpp b/src/Task.cpp index 5dee6f25e..23e3a44a5 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -270,6 +270,9 @@ void Task::set (const std::string& name, const std::string& value) { data[name] = json::decode (value); + if (! name.compare (0, 11, "annotation_", 11)) + ++annotation_count; + recalc_urgency = true; } @@ -286,6 +289,9 @@ void Task::remove (const std::string& name) { if (data.erase (name)) recalc_urgency = true; + + if (! name.compare (0, 11, "annotation_", 11)) + --annotation_count; } ////////////////////////////////////////////////////////////////////////////////