From: nds Date: Mon, 7 Sep 2015 04:17:29 +0000 (+0300) Subject: Temporary workaroud of crash in SALOME study, happens by closing document. X-Git-Tag: V_1.4.0_beta4~106 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9fb410343880450973efcbb719cb9ad9e71adda5;p=modules%2Fshaper.git Temporary workaroud of crash in SALOME study, happens by closing document. --- diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index 7fbbaca8c..bf2a2e657 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -63,6 +63,10 @@ Model_Objects::~Model_Objects() // delete all features of this document Events_Loop* aLoop = Events_Loop::loop(); // erase one by one to avoid access from the feature destructor itself from he map + // blocks the flush signals to avoid the temporary objects visualization in the viewer + // they should not be shown in order to do not lose highlight by erasing them + bool isActive = aLoop->activateFlushes(false); + while(!myFeatures.IsEmpty()) { NCollection_DataMap::Iterator aFeaturesIter(myFeatures); FeaturePtr aFeature = aFeaturesIter.Value(); @@ -74,6 +78,7 @@ Model_Objects::~Model_Objects() aFeature->erase(); myFeatures.UnBind(aFeaturesIter.Key()); } + aLoop->activateFlushes(isActive); aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_DELETED)); aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));