From 57ca5f04d759387755c59382cf085f6c1c782c07 Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 3 Jul 2015 11:10:40 +0300 Subject: [PATCH] Fix for the issue #654: edition of parameter causes disabling all sub-parameters --- src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp | 2 +- src/Model/Model_Document.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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); -- 2.39.2