Changeset d86d97


Ignore:
Timestamp:
Jul 12, 2017, 7:12:47 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Action_Thermostats, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, AutomationFragmentation_failures, Candidate_v1.6.1, ChemicalSpaceEvaluator, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Exclude_Hydrogens_annealWithBondGraph, Fix_Verbose_Codepatterns, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, PythonUI_with_named_parameters, Recreated_GuiChecks, StoppableMakroAction, TremoloParser_IncreasedPrecision
Children:
6c2ae0, 780f25
Parents:
9a1e099
git-author:
Frederik Heber <frederik.heber@…> (07/12/17 15:08:55)
git-committer:
Frederik Heber <frederik.heber@…> (07/12/17 19:12:47)
Message:

FIX: FragmentResultsContainer is no longer purged during run.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/FragmentationAction/ParseFragmentResultsAction.cpp

    r9a1e099 rd86d97  
    128128      assert_cast<FragmentationParseFragmentResultsState*>(_state.get());
    129129
    130   FragmentationResultContainer::purgeInstance();
     130  FragmentationResultContainer::getInstance().clear();
    131131  FragmentationResultContainer& container = FragmentationResultContainer::getInstance();
    132132  std::stringstream contents(state->streamed_container);
  • src/UIElements/Views/Qt4/QtFragmentList.cpp

    r9a1e099 rd86d97  
    6969QtFragmentList::QtFragmentList(QWidget * _parent) :
    7070    QTreeWidget (_parent),
    71     Observer("QtFragmentList")
     71    Observer("QtFragmentList"),
     72    dirty(true),
     73    fragmentresultcontainer_enabled(false)
    7274{
    7375  setColumnCount(COLUMNCOUNT);
     
    8183        setSelectionMode( MultiSelection );
    8284
    83         dirty = true;
    84 
    8585  refill();
    8686
     
    8888      FragmentationResultContainer::getInstance();
    8989        fragments.signOn(this);
     90        fragmentresultcontainer_enabled = true;
    9091
    9192  connect(this,SIGNAL(itemSelectionChanged()),this,SLOT(rowSelected()));
     
    9596QtFragmentList::~QtFragmentList()
    9697{
    97   FragmentationResultContainer &fragments =
    98       FragmentationResultContainer::getInstance();
    99   fragments.signOff(this);
     98  if (fragmentresultcontainer_enabled) {
     99    FragmentationResultContainer &fragments =
     100        FragmentationResultContainer::getInstance();
     101    fragments.signOff(this);
     102  }
    100103}
    101104
     
    193196{
    194197  // as a new instance should always already be present ... just sign on
    195   FragmentationResultContainer &fragments =
    196       FragmentationResultContainer::getInstance();
    197   fragments.signOn(this);
    198 }
    199 
     198  if (static_cast<FragmentationResultContainer *>(publisher) == FragmentationResultContainer::getPointer()) {
     199    fragmentresultcontainer_enabled = false;
     200  }
     201}
    200202
    201203void QtFragmentList::rowSelected()
  • src/UIElements/Views/Qt4/QtFragmentList.hpp

    r9a1e099 rd86d97  
    5959  //!> flag to indicate that we got an update
    6060  bool dirty;
     61  //!> flag to indicate that we are signed on to FragmentResultContainer
     62  bool fragmentresultcontainer_enabled;
    6163};
    6264
  • tests/regression/DiffFragmentResultContainer.cpp

    r9a1e099 rd86d97  
    7676  }
    7777
     78  FragmentationResultContainer &results = FragmentationResultContainer::getInstance();
    7879  // deserialize and compare
    7980  // Note that because FragmentationResultContainer is a singleton, we cannot
     
    8384  std::stringstream outfile1;
    8485  std::stringstream outfile2;
    85   FragmentationResultContainer::purgeInstance();
     86  results.clear();
    8687  {
    8788    std::ifstream infile(filenames[0].string().c_str());
    88     FragmentationResultContainer &results = FragmentationResultContainer::getInstance();
    8989    boost::archive::text_iarchive ia(infile);
    9090    boost::archive::text_oarchive oa(outfile1);
     
    9292    oa << results;
    9393  }
    94   FragmentationResultContainer::purgeInstance();
     94  results.clear();
    9595  {
    9696    std::ifstream infile(filenames[1].string().c_str());
    97     FragmentationResultContainer &results = FragmentationResultContainer::getInstance();
    9897    boost::archive::text_iarchive ia(infile);
    9998    boost::archive::text_oarchive oa(outfile2);
Note: See TracChangeset for help on using the changeset viewer.