Ignore:
Timestamp:
Jul 17, 2017, 12:28:51 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Action_Thermostats, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults
Children:
3bd4a66
Parents:
9346af
git-author:
Frederik Heber <frederik.heber@…> (07/06/17 22:18:13)
git-committer:
Frederik Heber <frederik.heber@…> (07/17/17 12:28:51)
Message:

Query::handle() no longer returns bool but has internal result flag.

  • we use this flag conditionally in setResult(), i.e. if the handle() has failed, then we should not set its result which might overwrite a present default value in the parameter.
  • this fixes the problem with StepWorldTime which has a default value of 1 but which was overwritten with 0 because of the non-conditionally calling of setResult().
  • this required change of "output-types" default parameter to an empty vector. So far, we were just lucky that this actually worked.
  • also StoreSaturatedFragmentAction needed the same change as default values have to be consistent over the specific token.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/CommandLineUI/Query/AtomsCommandLineQuery.cpp

    r9346af rbf87c2  
    5050CommandLineDialog::AtomsCommandLineQuery::~AtomsCommandLineQuery() {}
    5151
    52 bool CommandLineDialog::AtomsCommandLineQuery::handle() {
     52void CommandLineDialog::AtomsCommandLineQuery::handle() {
    5353  std::vector<int> IdxOfAtom;
    5454  if (CommandLineParser::getInstance().vm.count(getTitle())) {
     
    5757    } catch(boost::bad_any_cast &e) {
    5858      IdxOfAtom.clear();
    59       return false;
     59      return;
    6060    }
    6161    const atom *temp_element;
     
    6565        temp.push_back(temp_element);
    6666    }
    67     return true;
     67    handleSuccess = true; return;
    6868  }
    69   return false;
    7069}
    7170
Note: See TracChangeset for help on using the changeset viewer.