summaryrefslogtreecommitdiffstats
path: root/qt-ui/undobuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/undobuffer.h')
-rw-r--r--qt-ui/undobuffer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/undobuffer.h b/qt-ui/undobuffer.h
index beae8e390..9fac14710 100644
--- a/qt-ui/undobuffer.h
+++ b/qt-ui/undobuffer.h
@@ -12,7 +12,7 @@ private:
public:
explicit UndoCommand(QString commandName, dive* affectedDive);
- void setStateAfter(dive* affectedDive);
+ void setStateAfter(dive* affectedDive) { stateAfter = affectedDive; }
void undo();
void redo();
};
@@ -25,7 +25,9 @@ public:
~UndoBuffer();
bool canUndo();
bool canRedo();
+ UndoCommand *current() const { return list.at(curIdx - 1); }
private:
+ QList<UndoCommand*> list;
int curIdx;
public slots:
void redo();