- Converted from A3 to A3t.
This commit is contained in:
Paul Beckingham 2014-04-26 11:53:34 -07:00
parent f89f5469a4
commit 1f8763829d

View file

@ -44,8 +44,10 @@ CmdUndo::CmdUndo ()
////////////////////////////////////////////////////////////////////////////////
int CmdUndo::execute (std::string& output)
{
// Detect attemps to modify the task.
if (context.a3.extract_modifications ().size () > 0)
// Detect attempts to modify the task.
std::vector <Tree*>::iterator i;
for (i = context.a3t.tree ()->_branches.begin (); i != context.a3t.tree ()->_branches.end (); ++i)
if ((*i)->hasTag ("MODIFICATION"))
throw std::string (STRING_CMD_UNDO_MODS);
context.tdb2.revert ();