- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/SelectionAction/NotAllAtomsAction.cpp
r952f38 rbf3817 5 5 * Author: heber 6 6 */ 7 8 // include config.h 9 #ifdef HAVE_CONFIG_H 10 #include <config.h> 11 #endif 7 12 8 13 #include "Helpers/MemDebug.hpp" … … 28 33 // memento to remember the state when undoing 29 34 30 class Selection AllAtomsState : public ActionState {35 class SelectionNotAllAtomsState : public ActionState { 31 36 public: 32 Selection AllAtomsState(std::vector<atom*> _selectedAtoms) :37 SelectionNotAllAtomsState(std::vector<atom*> _selectedAtoms) : 33 38 selectedAtoms(_selectedAtoms) 34 39 {} … … 61 66 DoLog(1) && (Log() << Verbose(1) << "Unselecting all atoms." << endl); 62 67 World::getInstance().clearAtomSelection(); 63 return Action::state_ptr(new Selection AllAtomsState(selectedAtoms));68 return Action::state_ptr(new SelectionNotAllAtomsState(selectedAtoms)); 64 69 } 65 70 66 71 Action::state_ptr SelectionNotAllAtomsAction::performUndo(Action::state_ptr _state) { 67 Selection AllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());72 SelectionNotAllAtomsState *state = assert_cast<SelectionNotAllAtomsState*>(_state.get()); 68 73 69 74 World::getInstance().clearAtomSelection(); … … 71 76 World::getInstance().selectAtom(*iter); 72 77 73 return Action::state_ptr(new Selection AllAtomsState(state->selectedAtoms));78 return Action::state_ptr(new SelectionNotAllAtomsState(state->selectedAtoms)); 74 79 } 75 80 76 81 Action::state_ptr SelectionNotAllAtomsAction::performRedo(Action::state_ptr _state){ 77 Selection AllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());82 SelectionNotAllAtomsState *state = assert_cast<SelectionNotAllAtomsState*>(_state.get()); 78 83 79 84 World::getInstance().clearAtomSelection(); 80 85 81 return Action::state_ptr(new Selection AllAtomsState(state->selectedAtoms));86 return Action::state_ptr(new SelectionNotAllAtomsState(state->selectedAtoms)); 82 87 } 83 88
Note:
See TracChangeset
for help on using the changeset viewer.