2#include <score/application/ApplicationComponents.hpp>
3#include <score/command/CommandData.hpp>
4#include <score/plugins/StringFactoryKeySerialization.hpp>
7#include <core/command/CommandStack.hpp>
10template <
typename RedoFun>
15 std::vector<score::CommandData> undoStack, redoStack;
16 writer.writeTo(undoStack);
17 writer.writeTo(redoStack);
21 stack.undoable().clear();
22 stack.redoable().clear();
25 stack.setSavedIndex(-1);
28 for(
const auto& elt : undoStack)
30 auto cmd = components.instantiateUndoCommand(elt);
34 stack.undoable().push(cmd);
45 for(
const auto& elt : redoStack)
47 auto cmd = components.instantiateUndoCommand(elt);
49 stack.redoable().push(cmd);
Definition DataStreamVisitor.hpp:202
void checkDelimiter()
checkDelimiter
Definition DataStreamVisitor.cpp:47
Definition ApplicationComponents.hpp:68
Definition CommandStack.hpp:26
void updateStack(Callable &&c)
updateStack Updates the undo / redo stack
Definition CommandStack.hpp:176
Base toolkit upon which the software is built.
Definition Application.cpp:90