- Å duration field is stored in raw form, but must still be parseable.
This commit is contained in:
Paul Beckingham 2014-06-15 23:21:54 -04:00
parent d2a5a89bcf
commit 64c9cbe943

View file

@ -2032,10 +2032,28 @@ void Task::modify (modType type, bool text_required /* = false */)
else if (name == "recur" ||
column->type () == "duration")
{
// Store the raw value, for 'recur', else result.
// The duration is stored in raw form, but it must still be valid,
// and therefore is parsed first.
try
{
Eval e;
e.addSource (domSource);
e.addSource (namedDates);
e.ambiguity (false);
contextTask = *this;
Variant v;
e.evaluateInfixExpression (value, v);
if (v.type () == Variant::type_duration)
{
// Store the raw value, for 'recur'.
set (name, value);
++modCount;
}
}
catch (...) { /* NOP */ }
}
// Need handling for numeric types, used by UDAs.
else if (column->type () == "numeric")