]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Temporary workaroud of crash in SALOME study, happens by closing document.
authornds <nds@opencascade.com>
Mon, 7 Sep 2015 04:17:29 +0000 (07:17 +0300)
committernds <nds@opencascade.com>
Mon, 7 Sep 2015 04:17:29 +0000 (07:17 +0300)
src/Model/Model_Objects.cpp

index 7fbbaca8c098753599fb7bbf6c4284cb115e83cc..bf2a2e65750bd665c52c7e01b3abe5131a9cfd64 100644 (file)
@@ -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<TDF_Label, FeaturePtr>::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));