Changeset 8d9984 for molecuilder/src/Actions/Action.cpp
- Timestamp:
- Mar 25, 2010, 12:01:27 PM (16 years ago)
- Children:
- c3294f, fe3540
- Parents:
- 521e29
- git-author:
- Tillmann Crueger <crueger@…> (03/25/10 11:59:56)
- git-committer:
- Tillmann Crueger <crueger@…> (03/25/10 12:01:27)
- File:
-
- 1 edited
-
molecuilder/src/Actions/Action.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/Actions/Action.cpp
r521e29 r8d9984 10 10 #include "Actions/Action.hpp" 11 11 #include "Actions/ActionRegistry.hpp" 12 #include "Actions/ActionHistory.hpp" 12 13 13 14 using namespace std; … … 34 35 void Action::call(){ 35 36 // forward to private virtual 36 performCall(); 37 state_ptr state = performCall(); 38 if(shouldUndo() && state != failure){ 39 if(canUndo()){ 40 ActionHistory::getInstance().addElement(this,state); 41 } 42 else{ 43 ActionHistory::getInstance().clear(); 44 } 45 } 37 46 } 38 47 Action::state_ptr Action::undo(state_ptr _state) {
Note:
See TracChangeset
for help on using the changeset viewer.
