]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #654: edition of parameter causes disabling all sub-parameters
authormpv <mpv@opencascade.com>
Fri, 3 Jul 2015 08:10:40 +0000 (11:10 +0300)
committermpv <mpv@opencascade.com>
Fri, 3 Jul 2015 08:10:40 +0000 (11:10 +0300)
src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp
src/Model/Model_Document.cpp

index 8775c3ac6b4fa4ee5e46c9e967f997325de6e164..d473f00961dfdb21f58c9b9e82398b376b1b1165 100644 (file)
@@ -136,7 +136,7 @@ void FeaturesPlugin_Extrusion::execute()
       }
 
       // Check if shape is valid
-      if(aFeature.shape()->isNull()) {
+      if(!aFeature.shape().get() || aFeature.shape()->isNull()) {
         static const std::string aShapeError = "Resulting shape is Null";
         setError(aShapeError);
         break;
index cc37e8bef00f14c1cbeb63352724ec64aacae789..19cf104f701b09eccab650d8223ef8fa557e8c64 100644 (file)
@@ -731,8 +731,10 @@ void Model_Document::setCurrentFeature(std::shared_ptr<ModelAPI_Feature> theCurr
     bool aDisabledFlag = !aPassed;
     if (aMain.get() && aMain->isSub(anIter)) // sub-elements of not-disabled feature are not disabled
       aDisabledFlag = false;
-    if (anIter->getKind() == "Parameter") // parameters are always out of the history
-      aDisabledFlag = false;
+    if (anIter->getKind() == "Parameter") {// parameters are always out of the history of features, but not parameters
+      if (theCurrent.get() && theCurrent->getKind() != "Parameter")
+        aDisabledFlag = false;
+    }
     if (anIter->setDisabled(aDisabledFlag)) {
       // state of feature is changed => so feature become updated
       static Events_ID anUpdateEvent = aLoop->eventByName(EVENT_OBJECT_UPDATED);