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/UndoAction.def

    r5061d9 r0ec9f5  
    1313// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    1414// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    15 #undef paramtypes
    16 #undef paramreferences
    17 #undef paramtokens
    18 #undef paramdescriptions
    19 #undef paramdefaults
     15#define paramtypes (bool)
     16#define paramtokens ("till-mark")
     17#define paramdescriptions ("whether to undo just a single step (false) or until a previously set mark (true)")
     18#define paramdefaults (PARAM_DEFAULT(false))
     19#define paramreferences (undoTillMark)
     20#define paramvalids (DummyValidator<bool>())
    2021
    2122// some defines for all the names, you may use ACTION, STATE and PARAMS
     
    2728
    2829// finally the information stored in the ActionTrait specialization
    29 #define DESCRIPTION "undo last action"
     30#define DESCRIPTION "undo last action or until a given mark"
    3031#undef SHORTFORM
Note: See TracChangeset for help on using the changeset viewer.