diff -r 6ced87c58cea -r f3465a5f0dc4 mapeditor.h --- a/mapeditor.h Thu Jun 14 10:21:40 2007 +0000 +++ b/mapeditor.h Thu Jun 14 10:21:41 2007 +0000 @@ -68,13 +68,13 @@ */ void saveState(const SaveMode& savemode, const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &redoCommand, const QString &comment, LinkableMapObj *saveSelection); /*! Overloaded for convenience */ - void saveStateChangingPart(LinkableMapObj *undoSelection, LinkableMapObj* redoSelection, const QString &rendoCommand, const QString &comment); + void saveStateChangingPart(LinkableMapObj *undoSelection, LinkableMapObj* redoSelection, const QString &redoCommand, const QString &comment); /*! Overloaded for convenience */ void saveStateRemovingPart(LinkableMapObj *redoSelection, const QString &comment); /*! Overloaded for convenience */ - void saveState(LinkableMapObj *undoSelection, const QString &undoCommand, LinkableMapObj *redoSelection, const QString &rendoCommand, const QString &comment); + void saveState(LinkableMapObj *undoSelection, const QString &undoCommand, LinkableMapObj *redoSelection, const QString &redoCommand, const QString &comment); /*! Overloaded for convenience */ - void saveState(const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &rendoCommand, const QString &comment) ; + void saveState(const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &redoCommand, const QString &comment) ; public: @@ -144,7 +144,7 @@ private: void addMapReplaceInt(const QString & undoSel, const QString & path); void addMapInsertInt (const QString & path, int pos); - void pasteNoSave(); // paste clipboard to branch + void pasteNoSave(const int &n); //!< paste clipboard to branch public: void paste(); //!< Paste clipboard to branch and backup void cut(); //!< Cut to clipboard (and copy) @@ -365,8 +365,12 @@ QString tmpMapDir; // tmp directory with undo history QString histPath; // Path to history file + SimpleSettings undoSet; // undo/redo commands, saved in histPath int stepsTotal; // total number of steps (undos+redos) - SimpleSettings undoSet; // undo/redo commands + int curStep; // Current step in history (ring buffer) + int curClipboard; // number of history step, which is the current clipboard + int redosAvail; // Available number of redo steps + int undosAvail; // Available number of undo steps bool blockReposition; // block while load or undo bool blockSaveState; // block while load or undo