Feedback
- When bulk tasks are modified, the "project changed" messages are now retained until processing is completed, so that only one message per project is generated.
This commit is contained in:
@@ -65,6 +65,9 @@ int CmdStart::execute (std::string& output)
|
||||
// Apply the command line modifications to the new task.
|
||||
A3 modifications = context.a3.extract_modifications ();
|
||||
|
||||
// Accumulated project change notifications.
|
||||
std::map <std::string, std::string> projectChanges;
|
||||
|
||||
bool nagged = false;
|
||||
std::vector <Task>::iterator task;
|
||||
for (task = filtered.begin (); task != filtered.end (); ++task)
|
||||
@@ -93,7 +96,7 @@ int CmdStart::execute (std::string& output)
|
||||
if (!nagged)
|
||||
nagged = nag (*task);
|
||||
dependencyChainOnStart (*task);
|
||||
context.footnote (onProjectChange (*task, false));
|
||||
projectChanges[task->get ("project")] = onProjectChange (*task, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -111,6 +114,12 @@ int CmdStart::execute (std::string& output)
|
||||
}
|
||||
}
|
||||
|
||||
// Now list the project changes.
|
||||
std::map <std::string, std::string>::iterator i;
|
||||
for (i = projectChanges.begin (); i != projectChanges.end (); ++i)
|
||||
if (i->first != "")
|
||||
context.footnote (i->second);
|
||||
|
||||
context.tdb2.commit ();
|
||||
feedback_affected (count == 1 ? STRING_CMD_START_1 : STRING_CMD_START_N, count);
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user