Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/SelectionAction/NotAllAtomsAction.cpp

    r047878 r53fb71  
    2828// memento to remember the state when undoing
    2929
    30 class SelectionAllAtomsState : public ActionState {
     30class SelectionNotAllAtomsState : public ActionState {
    3131public:
    32   SelectionAllAtomsState(std::vector<atom*> _selectedAtoms) :
     32  SelectionNotAllAtomsState(std::vector<atom*> _selectedAtoms) :
    3333    selectedAtoms(_selectedAtoms)
    3434  {}
     
    6161  DoLog(1) && (Log() << Verbose(1) << "Unselecting all atoms." << endl);
    6262  World::getInstance().clearAtomSelection();
    63   return Action::state_ptr(new SelectionAllAtomsState(selectedAtoms));
     63  return Action::state_ptr(new SelectionNotAllAtomsState(selectedAtoms));
    6464}
    6565
    6666Action::state_ptr SelectionNotAllAtomsAction::performUndo(Action::state_ptr _state) {
    67   SelectionAllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());
     67  SelectionNotAllAtomsState *state = assert_cast<SelectionNotAllAtomsState*>(_state.get());
    6868
    6969  World::getInstance().clearAtomSelection();
     
    7171    World::getInstance().selectAtom(*iter);
    7272
    73   return Action::state_ptr(new SelectionAllAtomsState(state->selectedAtoms));
     73  return Action::state_ptr(new SelectionNotAllAtomsState(state->selectedAtoms));
    7474}
    7575
    7676Action::state_ptr SelectionNotAllAtomsAction::performRedo(Action::state_ptr _state){
    77   SelectionAllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());
     77  SelectionNotAllAtomsState *state = assert_cast<SelectionNotAllAtomsState*>(_state.get());
    7878
    7979  World::getInstance().clearAtomSelection();
    8080
    81   return Action::state_ptr(new SelectionAllAtomsState(state->selectedAtoms));
     81  return Action::state_ptr(new SelectionNotAllAtomsState(state->selectedAtoms));
    8282}
    8383
Note: See TracChangeset for help on using the changeset viewer.