[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
@@ -29,7 +29,7 @@ class SheetData: public QObject {
QString m_tilesheetPath;
QString m_currentPalettePath;
uint64_t m_cmdIdx = 0;
QUndoStack m_cmdStack;
QUndoStack *m_cmdStack;
QStringList m_palette;
QVector<int> m_pixels;
int m_columns = 1;
@@ -37,6 +37,8 @@ class SheetData: public QObject {
int m_selectedColor = 0;
public:
SheetData(QUndoStack*);
Q_INVOKABLE void updatePixel(QVariant pixel);
Q_INVOKABLE void beginCmd();
@@ -131,8 +133,6 @@ class TileSheetEditor: public studio::Editor {
QString itemName() override;
QUndoStack *undoStack() override;
protected:
void saveItem() override;