From 1b28d8714bf91be9e3b517f66eeefdd5e1121762 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 16 Aug 2009 17:22:17 -0400 Subject: [PATCH] Bug Fix - #249 - Fixed bug that caused two annotations with the same date to be parsed identically, and therefore were not considered unique annotations after the "edit" command. --- src/edit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/edit.cpp b/src/edit.cpp index d69861c15..418f9a476 100644 --- a/src/edit.cpp +++ b/src/edit.cpp @@ -500,6 +500,12 @@ static void parseTask (Task& task, const std::string& after) if (gap != std::string::npos) { Date when (value.substr (0, gap), context.config.get ("dateformat", "m/d/Y")); + + // This guarantees that if more than one annotation has the same date, + // that the seconds will be different, thus unique, thus not squashed. + // Bug #249 + when += (const int) annotations.size (); + std::stringstream name; name << "annotation_" << when.toEpoch (); std::string text = trim (value.substr (gap, std::string::npos), "\t ");