mapeditor.h
changeset 502 f3465a5f0dc4
parent 491 c58b3973337c
child 505 244e309b4047
     1.1 --- a/mapeditor.h	Thu Jun 14 10:21:40 2007 +0000
     1.2 +++ b/mapeditor.h	Thu Jun 14 10:21:41 2007 +0000
     1.3 @@ -68,13 +68,13 @@
     1.4  	*/	
     1.5      void saveState(const SaveMode& savemode, const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &redoCommand, const QString &comment, LinkableMapObj *saveSelection);
     1.6  	/*! Overloaded for convenience */
     1.7 -    void saveStateChangingPart(LinkableMapObj *undoSelection, LinkableMapObj* redoSelection, const QString &rendoCommand, const QString &comment);
     1.8 +    void saveStateChangingPart(LinkableMapObj *undoSelection, LinkableMapObj* redoSelection, const QString &redoCommand, const QString &comment);
     1.9  	/*! Overloaded for convenience */
    1.10      void saveStateRemovingPart(LinkableMapObj *redoSelection, const QString &comment);
    1.11  	/*! Overloaded for convenience */
    1.12 -    void saveState(LinkableMapObj *undoSelection, const QString &undoCommand, LinkableMapObj *redoSelection, const QString &rendoCommand, const QString &comment); 
    1.13 +    void saveState(LinkableMapObj *undoSelection, const QString &undoCommand, LinkableMapObj *redoSelection, const QString &redoCommand, const QString &comment); 
    1.14  	/*! Overloaded for convenience */
    1.15 -    void saveState(const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &rendoCommand, const QString &comment) ;
    1.16 +    void saveState(const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &redoCommand, const QString &comment) ;
    1.17  
    1.18  public:	
    1.19  
    1.20 @@ -144,7 +144,7 @@
    1.21  private:	
    1.22      void addMapReplaceInt(const QString & undoSel, const QString & path);
    1.23      void addMapInsertInt (const QString & path, int pos);
    1.24 -    void pasteNoSave();		// paste clipboard to branch
    1.25 +    void pasteNoSave(const int &n);		//!< paste clipboard to branch
    1.26  public:	
    1.27      void paste();		//!< Paste clipboard to branch and backup
    1.28      void cut();			//!< Cut to clipboard (and copy)
    1.29 @@ -365,8 +365,12 @@
    1.30  
    1.31  	QString tmpMapDir;			// tmp directory with undo history
    1.32  	QString histPath;			// Path to history file
    1.33 +	SimpleSettings undoSet;		// undo/redo commands, saved in histPath
    1.34  	int stepsTotal;				// total number of steps (undos+redos) 
    1.35 -	SimpleSettings undoSet;		// undo/redo commands
    1.36 +	int curStep;				// Current step in history (ring buffer)
    1.37 +	int curClipboard;			// number of history step, which is the current clipboard
    1.38 +	int redosAvail;				// Available number of redo steps
    1.39 +	int undosAvail;				// Available number of undo steps
    1.40  	bool blockReposition;		// block while load or undo
    1.41  	bool blockSaveState;		// block while load or undo
    1.42