[nostalgia/studio] Get Undo/Redo working

This commit is contained in:
2022-02-16 20:16:49 -06:00
parent 72ce8ea4d9
commit c92ecdf499
5 changed files with 30 additions and 12 deletions
+9 -6
View File
@@ -32,6 +32,7 @@ class NOSTALGIASTUDIO_EXPORT Editor: public Widget {
[[nodiscard]]
virtual ox::String itemName() const = 0;
[[nodiscard]]
virtual ox::String itemDisplayName() const;
virtual void cut();
@@ -42,6 +43,14 @@ class NOSTALGIASTUDIO_EXPORT Editor: public Widget {
virtual void exportFile();
/**
* Returns the undo stack holding changes to the item being edited.
*/
[[nodiscard]]
virtual UndoStack *undoStack() noexcept {
return nullptr;
}
void close();
/**
@@ -58,12 +67,6 @@ class NOSTALGIASTUDIO_EXPORT Editor: public Widget {
[[nodiscard]]
bool unsavedChanges() const noexcept;
/**
* Returns the undo stack holding changes to the item being edited.
*/
[[nodiscard]]
UndoStack *undoStack();
void setExportable(bool);
[[nodiscard]]