CmdUndo
- Converted from A3 to A3t.
This commit is contained in:
@@ -44,9 +44,11 @@ CmdUndo::CmdUndo ()
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdUndo::execute (std::string& output)
|
int CmdUndo::execute (std::string& output)
|
||||||
{
|
{
|
||||||
// Detect attemps to modify the task.
|
// Detect attempts to modify the task.
|
||||||
if (context.a3.extract_modifications ().size () > 0)
|
std::vector <Tree*>::iterator i;
|
||||||
throw std::string (STRING_CMD_UNDO_MODS);
|
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 ();
|
context.tdb2.revert ();
|
||||||
context.tdb2.commit ();
|
context.tdb2.commit ();
|
||||||
|
|||||||
Reference in New Issue
Block a user