- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.cpp
rbe21fa rf10b0c 40 40 /** =========== define the function ====================== */ 41 41 Action::state_ptr SelectionMoleculeByFormulaAction::performCall() { 42 LOG(1, "Selecting molecules with chemical formula " << params.formula << ":");43 // std::vector<molecule *> matchingMolecules = World::getInstance().getAllMolecules(MoleculeByFormula(params.formula ));42 LOG(1, "Selecting molecules with chemical formula " << params.formula.get() << ":"); 43 // std::vector<molecule *> matchingMolecules = World::getInstance().getAllMolecules(MoleculeByFormula(params.formula.get())); 44 44 std::vector<molecule *> selectedMolecules = 45 World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByFormula(params.formula ));45 World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByFormula(params.formula.get())); 46 46 // BOOST_FOREACH(molecule *mol, matchingMolecules) 47 47 // LOG(1, "\t" << mol->getId() << ", " << mol->getName() << "."); 48 World::getInstance().selectAllMolecules(MoleculeByFormula(params.formula ));48 World::getInstance().selectAllMolecules(MoleculeByFormula(params.formula.get())); 49 49 LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected."); 50 50 return Action::state_ptr(new SelectionMoleculeByFormulaState(selectedMolecules,params)); … … 54 54 SelectionMoleculeByFormulaState *state = assert_cast<SelectionMoleculeByFormulaState*>(_state.get()); 55 55 56 World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula ));56 World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula.get())); 57 57 BOOST_FOREACH( molecule *mol, state->selectedMolecules) 58 58 World::getInstance().selectMolecule(mol); … … 64 64 SelectionMoleculeByFormulaState *state = assert_cast<SelectionMoleculeByFormulaState*>(_state.get()); 65 65 66 World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula ));66 World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula.get())); 67 67 68 68 return Action::state_ptr(_state);
Note:
See TracChangeset
for help on using the changeset viewer.