Only set contextTask if not adding a new task

When adding a new task, the current task is empty, so there is no
context in which to evaluate DOM references.  #2683 will address this in
a more robust fashion.
This commit is contained in:
Dustin J. Mitchell
2021-12-16 02:41:16 +00:00
committed by Tomas Babej
parent 2812a8c77a
commit 8d3953183a
7 changed files with 21 additions and 7 deletions

View File

@@ -121,7 +121,9 @@ void ColumnProject::modify (Task& task, const std::string& value)
{
Eval e;
e.addSource (domSource);
contextTask = &task;
if (!task.is_empty ()) {
contextTask = &task;
}
Variant v;
e.evaluateInfixExpression (value, v);