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:
@@ -64,6 +64,9 @@ int CmdStop::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;
|
||||
|
||||
std::vector <Task>::iterator task;
|
||||
for (task = filtered.begin (); task != filtered.end (); ++task)
|
||||
{
|
||||
@@ -89,7 +92,7 @@ int CmdStop::execute (std::string& output)
|
||||
++count;
|
||||
feedback_affected (STRING_CMD_STOP_TASK, *task);
|
||||
dependencyChainOnStart (*task);
|
||||
context.footnote (onProjectChange (*task, false));
|
||||
projectChanges[task->get ("project")] = onProjectChange (*task, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -107,6 +110,12 @@ int CmdStop::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_STOP_1 : STRING_CMD_STOP_N, count);
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user