[nostalgia/studio] Move undo stack to Editor

This commit is contained in:
2020-03-23 23:25:05 -05:00
parent 362aeef3c7
commit f90a6e30ea
4 changed files with 22 additions and 26 deletions
+6 -5
View File
@@ -19,6 +19,7 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
Q_OBJECT
private:
QUndoStack m_cmdStack;
bool m_unsavedChanges = false;
public:
@@ -31,11 +32,6 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
*/
virtual QString itemName() = 0;
/**
* Returns the undo stack holding changes to the item being edited.
*/
virtual QUndoStack *undoStack();
/**
* Save changes to item being edited.
*/
@@ -47,6 +43,11 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
*/
void setUnsavedChanges(bool);
/**
* Returns the undo stack holding changes to the item being edited.
*/
QUndoStack *undoStack();
protected:
/**
* Save changes to item being edited.