Changeset 0ec9f5 for src/Actions/ActionHistory.cpp
- Timestamp:
- Apr 23, 2021, 9:02:12 PM (5 years ago)
- 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)
- File:
-
- 1 edited
-
src/Actions/ActionHistory.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/ActionHistory.cpp
r5061d9 r0ec9f5 64 64 HistoryElement elem = history.back(); 65 65 LOG(1, "INFO: Undoing action " << elem.action->getName()); 66 if ((mark != NULL) && (mark == &elem)) { 67 LOG(2, "DEBUG: Undoing marked item in ActionHistory, hence resetting mark."); 68 mark = NULL; 69 } 66 70 history.pop_back(); 67 71 ActionState::ptr newState = elem.action->undo(elem.state); … … 93 97 } 94 98 99 void ActionHistory::setMark() { 100 mark = &(history.back()); 101 } 102 103 void ActionHistory::unsetMark() { 104 mark = NULL; 105 } 106 107 void ActionHistory::undoTillMark() { 108 if (mark == NULL) { 109 undoLast(); 110 } else { 111 while (mark != &(history.back())) 112 undoLast(); 113 } 114 } 115 95 116 void ActionHistory::addElement(Action* action,ActionState::ptr state){ 96 117 yrotsih.clear();
Note:
See TracChangeset
for help on using the changeset viewer.
