Salome HOME
Issue #3172: Valid partition is invalid after save/open saved document
[modules/shaper.git] / src / ModelAPI / ModelAPI_Feature.cpp
index 6eacd88767ff741bde1d1766ab8487f852cb14ac..14ce7f46c574cc69834dbd374f5422f6975b4000 100644 (file)
@@ -208,11 +208,13 @@ bool ModelAPI_Feature::setDisabled(const bool theFlag)
         (*aResIter)->setDisabled(*aResIter, false);
       }
       // update selection for the case something was updated higher in the history
-      // while this feature was disabled
+      // while this feature was disabled, but avoid flushing it immediately and
+      // wait while all the previous features update myIsDisabled flag
+      // (flush will be called by the document)
       static Events_Loop* aLoop = Events_Loop::loop();
       static Events_ID kUpdatedSel = aLoop->eventByName(EVENT_UPDATE_SELECTION);
       static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get();
-      aECreator->sendUpdated(data()->owner(), kUpdatedSel, false);
+      aECreator->sendUpdated(data()->owner(), kUpdatedSel, true);
     }
     return true;
   }