diff --git a/src/lib/component/controller/UndoRedoController.cpp b/src/lib/component/controller/UndoRedoController.cpp index 4747de54..68705eb0 100644 --- a/src/lib/component/controller/UndoRedoController.cpp +++ b/src/lib/component/controller/UndoRedoController.cpp @@ -1,7 +1,5 @@ #include "component/controller/UndoRedoController.h" -#include - #include "component/view/UndoRedoView.h" #include "utility/logging/logging.h" @@ -24,6 +22,13 @@ UndoRedoView* UndoRedoController::getView() void UndoRedoController::handleMessage(MessageActivateTokens* message) { + if(m_lastCommand && m_lastCommand->getType() == "MessageActivateTokens") + { + if(static_cast(m_lastCommand.get())->tokenIds == message->tokenIds) + { + return; + } + } std::shared_ptr m = std::shared_ptr(new MessageActivateTokens(*message)); std::shared_ptr msg = m; processMessage(msg);