Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.cpp

    rbe21fa rf10b0c  
    4040/** =========== define the function ====================== */
    4141Action::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()));
    4444  std::vector<molecule *> selectedMolecules =
    45       World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByFormula(params.formula));
     45      World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByFormula(params.formula.get()));
    4646//  BOOST_FOREACH(molecule *mol, matchingMolecules)
    4747//    LOG(1, "\t" << mol->getId() << ", " << mol->getName() << ".");
    48   World::getInstance().selectAllMolecules(MoleculeByFormula(params.formula));
     48  World::getInstance().selectAllMolecules(MoleculeByFormula(params.formula.get()));
    4949  LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected.");
    5050  return Action::state_ptr(new SelectionMoleculeByFormulaState(selectedMolecules,params));
     
    5454  SelectionMoleculeByFormulaState *state = assert_cast<SelectionMoleculeByFormulaState*>(_state.get());
    5555
    56   World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula));
     56  World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula.get()));
    5757  BOOST_FOREACH( molecule *mol, state->selectedMolecules)
    5858    World::getInstance().selectMolecule(mol);
     
    6464  SelectionMoleculeByFormulaState *state = assert_cast<SelectionMoleculeByFormulaState*>(_state.get());
    6565
    66   World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula));
     66  World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula.get()));
    6767
    6868  return Action::state_ptr(_state);
Note: See TracChangeset for help on using the changeset viewer.