From: mpv Date: Fri, 3 Jul 2015 08:10:40 +0000 (+0300) Subject: Fix for the issue #654: edition of parameter causes disabling all sub-parameters X-Git-Tag: V_1.3.0~120 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=57ca5f04d759387755c59382cf085f6c1c782c07;p=modules%2Fshaper.git Fix for the issue #654: edition of parameter causes disabling all sub-parameters --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp index 8775c3ac6..d473f0096 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp @@ -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; diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index cc37e8bef..19cf104f7 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -731,8 +731,10 @@ void Model_Document::setCurrentFeature(std::shared_ptr 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);