Just set contextTask in Task::modify

Based on the observation that every command was setting contextTask
immediately before calling `task.modify(..)`.
This commit is contained in:
Dustin J. Mitchell
2021-12-18 02:10:15 +00:00
committed by Tomas Babej
parent db26a28bf9
commit 2ea6dd627e
11 changed files with 5 additions and 42 deletions

View File

@@ -60,7 +60,7 @@
#define APPROACHING_INFINITY 1000 // Close enough. This isn't rocket surgery.
extern Task& contextTask;
extern Task* contextTask;
static const float epsilon = 0.000001;
#endif
@@ -2271,6 +2271,10 @@ void Task::modify (modType type, bool text_required /* = false */)
{
std::string label = " MODIFICATION ";
// while reading the parse tree, consider DOM references in the context of
// this task
contextTask = this;
// Need this for later comparison.
auto originalStatus = getStatus ();