Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/TextUI/Query/AtomsTextQuery.cpp

    r955b91 rf10b0c  
    3131
    3232
    33 TextDialog::AtomsTextQuery::AtomsTextQuery(std::string title, std::string _description) :
    34     Dialog::AtomsQuery(title,_description)
     33TextDialog::AtomsTextQuery::AtomsTextQuery(Parameter<std::vector<const atom *> > &param, std::string title, std::string _description) :
     34    Dialog::AtomsQuery(param, title,_description)
    3535{}
    3636
     
    4444  // dissect by " "
    4545  std::string::iterator olditer = line.begin();
     46  std::vector<const atom *> temp_atoms;
    4647  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
    4748    if (*iter == ' ') {
     
    5354        break;
    5455      }
    55       tmp.push_back(temp);
     56      temp_atoms.push_back(temp);
    5657      olditer = iter;
    5758    }
     
    6364    if(!temp && idxOfAtom!=-1) {
    6465      std::cout << "Invalid Atom Index" << idxOfAtom << std::endl;
    65       tmp.push_back(temp);
     66      temp_atoms.push_back(temp);
    6667    }
    6768  }
     69  tmp.set(temp_atoms);
    6870
    6971  return (idxOfAtom!=-1);
Note: See TracChangeset for help on using the changeset viewer.