- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/SelectionAction/NotAllAtomsAction.cpp
r047878 r53fb71 28 28 // memento to remember the state when undoing 29 29 30 class Selection AllAtomsState : public ActionState {30 class SelectionNotAllAtomsState : public ActionState { 31 31 public: 32 Selection AllAtomsState(std::vector<atom*> _selectedAtoms) :32 SelectionNotAllAtomsState(std::vector<atom*> _selectedAtoms) : 33 33 selectedAtoms(_selectedAtoms) 34 34 {} … … 61 61 DoLog(1) && (Log() << Verbose(1) << "Unselecting all atoms." << endl); 62 62 World::getInstance().clearAtomSelection(); 63 return Action::state_ptr(new Selection AllAtomsState(selectedAtoms));63 return Action::state_ptr(new SelectionNotAllAtomsState(selectedAtoms)); 64 64 } 65 65 66 66 Action::state_ptr SelectionNotAllAtomsAction::performUndo(Action::state_ptr _state) { 67 Selection AllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());67 SelectionNotAllAtomsState *state = assert_cast<SelectionNotAllAtomsState*>(_state.get()); 68 68 69 69 World::getInstance().clearAtomSelection(); … … 71 71 World::getInstance().selectAtom(*iter); 72 72 73 return Action::state_ptr(new Selection AllAtomsState(state->selectedAtoms));73 return Action::state_ptr(new SelectionNotAllAtomsState(state->selectedAtoms)); 74 74 } 75 75 76 76 Action::state_ptr SelectionNotAllAtomsAction::performRedo(Action::state_ptr _state){ 77 Selection AllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());77 SelectionNotAllAtomsState *state = assert_cast<SelectionNotAllAtomsState*>(_state.get()); 78 78 79 79 World::getInstance().clearAtomSelection(); 80 80 81 return Action::state_ptr(new Selection AllAtomsState(state->selectedAtoms));81 return Action::state_ptr(new SelectionNotAllAtomsState(state->selectedAtoms)); 82 82 } 83 83
Note:
See TracChangeset
for help on using the changeset viewer.