move use of contextTask out of columns, into commands
This commit is contained in:
committed by
Tomas Babej
parent
e98b61f2b5
commit
6e9ad1048d
@@ -30,6 +30,8 @@
|
||||
#include <format.h>
|
||||
#include <main.h>
|
||||
|
||||
extern Task* contextTask;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
CmdAdd::CmdAdd ()
|
||||
{
|
||||
@@ -51,6 +53,10 @@ int CmdAdd::execute (std::string& output)
|
||||
{
|
||||
// Apply the command line modifications to the new task.
|
||||
Task task;
|
||||
|
||||
// the task is empty, but DOM references can refer to earlier parts of the
|
||||
// command line, e.g., `task add due:20110101 wait:due`.
|
||||
contextTask = &task;
|
||||
task.modify (Task::modReplace, true);
|
||||
Context::getContext ().tdb2.add (task);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user