- Task modifications that involved no 'words' were clobbering the description
  unnecessarily.
This commit is contained in:
Paul Beckingham
2014-05-26 11:02:24 -04:00
parent 0047bb7325
commit 2030df8563

View File

@@ -2008,9 +2008,8 @@ void Task::modify (modType type)
Variant v; Variant v;
e.evaluateInfixExpression (value, v); e.evaluateInfixExpression (value, v);
// TODO if v is duration and < 5y, add to now. // TODO If v is duration and < 5y, add to now, else store as date.
// TODO else store as date. // TODO Not sure if the above still holds true.
set (name, v.get_date ()); set (name, v.get_date ());
} }
// Special case: type duration. // Special case: type duration.
@@ -2113,7 +2112,10 @@ void Task::modify (modType type)
} }
} }
// Task::modType determines what happens to the WORD arguments. // Task::modType determines what happens to the WORD arguments, if there are
// any.
if (text != "")
{
switch (type) switch (type)
{ {
case modReplace: set ("description", text); break; case modReplace: set ("description", text); break;
@@ -2121,6 +2123,7 @@ void Task::modify (modType type)
case modAppend: set ("description", get ("description") + " " + text); break; case modAppend: set ("description", get ("description") + " " + text); break;
case modAnnotate: addAnnotation (text); break; case modAnnotate: addAnnotation (text); break;
} }
}
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////