[nostalgia/studio] Move undo stack to Editor
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user