replace the global contextTask with a Context field

This commit is contained in:
Dustin J. Mitchell
2021-12-18 02:37:41 +00:00
committed by Tomas Babej
parent 53127bf844
commit 65830dd705
4 changed files with 16 additions and 17 deletions

View File

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