History

Remove UndoStack API

edit.js shares a global undo stack through the UndoStack API. Because the stack is globally shared, disabling the feature while create is disabled doesn't make a lot of sense because it might disabling the ability to undo/redo with another feature. Because UndoStack is only used by edit.js, UndoStack is being removed in favor of a local undo stack implemented within edit.js.

Ryan Huffman committed 8 years ago

Commit 09b25651 parent 3b1e0dc6 files · +102 −143Browse files

Showing the changes to interface/src/Menu.cpp (1 of 6 files). Show all

Unified · Split

interface/src/Menu.cpp+0−13
@@ -90,19 +90,6 @@ Menu::Menu() { · 89 unmodified lines
9090 // Edit menu ----------------------------------
9191 MenuWrapper* editMenu = addMenu("Edit");
9292
93− // Edit > Undo
94− QUndoStack* undoStack = qApp->getUndoStack();
95− QAction* undoAction = undoStack->createUndoAction(editMenu);
96− undoAction->setShortcut(Qt::CTRL | Qt::Key_Z);
97− addActionToQMenuAndActionHash(editMenu, undoAction);
98−
99− // Edit > Redo
100− QAction* redoAction = undoStack->createRedoAction(editMenu);
101− redoAction->setShortcut(Qt::CTRL | Qt::SHIFT | Qt::Key_Z);
102− addActionToQMenuAndActionHash(editMenu, redoAction);
103−
104− editMenu->addSeparator();
105−
10693 // Edit > Cut
10794 auto cutAction = addActionToQMenuAndActionHash(editMenu, "Cut", QKeySequence::Cut);
10895 connect(cutAction, &QAction::triggered, [] {