diff options
Diffstat (limited to 'src/Authoring/Client/Code/Core/Commands/CmdStack.cpp')
-rw-r--r-- | src/Authoring/Client/Code/Core/Commands/CmdStack.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Authoring/Client/Code/Core/Commands/CmdStack.cpp b/src/Authoring/Client/Code/Core/Commands/CmdStack.cpp index c6aa0882..3530822f 100644 --- a/src/Authoring/Client/Code/Core/Commands/CmdStack.cpp +++ b/src/Authoring/Client/Code/Core/Commands/CmdStack.cpp @@ -141,6 +141,7 @@ void CCmdStack::Undo() return; } if (m_UndoList.size() > 0) { + m_undoingOrRedoing = true; CCmd *theLastCommand = m_UndoList.back(); m_UndoList.pop_back(); @@ -162,6 +163,7 @@ void CCmdStack::Undo() m_Listener->SetCommandModifiedFlag(TRUE); } } + m_undoingOrRedoing = false; } } @@ -175,6 +177,7 @@ void CCmdStack::Undo() void CCmdStack::Redo() { if (m_RedoList.size() > 0) { + m_undoingOrRedoing = true; CCmd *theLastCommand = m_RedoList.back(); m_RedoList.pop_back(); @@ -191,6 +194,7 @@ void CCmdStack::Redo() m_Listener->SetCommandModifiedFlag(TRUE); } } + m_undoingOrRedoing = false; } } @@ -216,6 +220,11 @@ bool CCmdStack::CanRedo() return m_RedoList.size() > 0; } +bool CCmdStack::isUndoingOrRedoing() const +{ + return m_undoingOrRedoing; +} + //============================================================================= /** * Remove the last command from the undo list |