Ignore:
Timestamp:
Apr 23, 2021, 9:02:12 PM (5 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
0fbea3
Parents:
5061d9
git-author:
Frederik Heber <frederik.heber@…> (04/06/21 20:09:39)
git-committer:
Frederik Heber <frederik.heber@…> (04/23/21 21:02:12)
Message:

Added UndoMarkAction.

NOTE: This action is necessary as not all actions are actually recorded
in the history. For example, the UndoAction is an action that is not
pushed into the history deque and also must not as further undos would
then become impossible. There are other actions that just do output
or similar things that do not change the state.
This makes it impossible to undo back to a certain state by blindly
counting actions as one cannot know from the outside whether an action
is stateless or not.

undoing till the set mark.

  • TESTS: added regression test case on undo-mark.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/ActionQueue.hpp

    r5061d9 r0ec9f5  
    129129  void outputAsPython(std::ostream &output) const;
    130130
    131   /** Undoes last called Acfriend void ::cleanUp();tion.
     131  /** Undoes last called Action.
    132132   *
    133133   */
     
    138138   */
    139139  void redoLast();
     140
     141  /**
     142   * Marks the current item of the action history to allow returning to that state lateron.
     143   */
     144  void setMark();
     145
     146  /**
     147   * Resets any currently marked item in the action history.
     148   */
     149  void unsetMark();
     150
     151  /** Undoes actions till a set mark in the ActionHistory.
     152   *
     153   */
     154  void undoTillMark();
    140155
    141156  /** Checks whether there is one completed Action stored in ActionHistory in the past.
Note: See TracChangeset for help on using the changeset viewer.