2 #include <score/application/ApplicationComponents.hpp>
3 #include <score/command/CommandData.hpp>
4 #include <score/plugins/StringFactoryKeySerialization.hpp>
7 #include <core/command/CommandStack.hpp>
10 template <
typename RedoFun>
11 void loadCommandStack(
15 std::vector<score::CommandData> undoStack, redoStack;
16 writer.writeTo(undoStack);
17 writer.writeTo(redoStack);
21 stack.undoable().clear();
22 stack.redoable().clear();
24 stack.updateStack([&]() {
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
Base toolkit upon which the software is built.
Definition: Application.cpp:90