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.
This commit is contained in:
@@ -500,6 +500,12 @@ static void parseTask (Task& task, const std::string& after)
|
|||||||
if (gap != std::string::npos)
|
if (gap != std::string::npos)
|
||||||
{
|
{
|
||||||
Date when (value.substr (0, gap), context.config.get ("dateformat", "m/d/Y"));
|
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;
|
std::stringstream name;
|
||||||
name << "annotation_" << when.toEpoch ();
|
name << "annotation_" << when.toEpoch ();
|
||||||
std::string text = trim (value.substr (gap, std::string::npos), "\t ");
|
std::string text = trim (value.substr (gap, std::string::npos), "\t ");
|
||||||
|
|||||||
Reference in New Issue
Block a user