Salome HOME
Fix for the issue #2900 : Crash or freeze when activating the Partset
authormpv <mpv@opencascade.com>
Mon, 8 Apr 2019 12:01:23 +0000 (15:01 +0300)
committermpv <mpv@opencascade.com>
Mon, 8 Apr 2019 12:01:41 +0000 (15:01 +0300)
src/Model/Model_AttributeSelection.cpp

index e540e3e6663edc3f0f7d5f1c25663fdea320252f..3d325a6880680b19462f8bdcbeb6838fa97e7ae2 100644 (file)
@@ -1443,7 +1443,12 @@ void Model_AttributeSelection::updateInHistory(bool& theRemove)
               continue;
 
             FeaturePtr aRefFeat = std::dynamic_pointer_cast<ModelAPI_Feature>((*aRef)->owner());
+
             if (aRefFeat.get() && aRefFeat != owner() && aRefFeat->firstResult().get()) {
+              // check the reference is concealed: #2900
+              ModelAPI_ValidatorsFactory* aValidators = ModelAPI_Session::get()->validators();
+              if (!aValidators->isConcealed(aRefFeat->getKind(), (*aRef)->id()))
+                continue;
               FeaturePtr aThisFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(owner());
               if (!aDoc->isLaterByDep(aRefFeat, aThisFeature)) { // found better feature
                 aFoundNewContext = true;