From: mpv Date: Fri, 22 Apr 2016 12:43:28 +0000 (+0300) Subject: Make sketch is not disabled after removing of Parameter in Parameters feature and... X-Git-Tag: V_2.3.0~132 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fbed9a93d3ad035c34632fe28c18ae9f6d973faa;p=modules%2Fshaper.git Make sketch is not disabled after removing of Parameter in Parameters feature and Apply --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 2c4bb4bd8..9836570f0 100755 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -945,6 +945,7 @@ void Model_Document::setCurrentFeature( } } + /* if (theVisible) { // make features below which are not in history also enabled: sketch subs FeaturePtr aNext = theCurrent.get() ? myObjs->nextFeature(theCurrent) : myObjs->firstFeature(); @@ -955,7 +956,7 @@ void Model_Document::setCurrentFeature( theCurrent = aNext; } } - } + }*/ if (theCurrent.get()) { std::shared_ptr aData = std::static_pointer_cast(theCurrent->data()); if (!aData.get() || !aData->isValid()) { @@ -1036,6 +1037,12 @@ void Model_Document::setCurrentFeatureUp() FeaturePtr aCurrent = currentFeature(false); if (aCurrent.get()) { // if not, do nothing because null is the upper FeaturePtr aPrev = myObjs->nextFeature(aCurrent, true); + // make the higher level composite as current (sketch becomes disabled if line is enabled) + if (aPrev.get()) { + for(FeaturePtr aComp = ModelAPI_Tools::compositeOwner(aPrev); aComp.get(); + aComp = ModelAPI_Tools::compositeOwner(aPrev)) + aPrev = aComp; + } // do not flush: it is called only on remove, it will be flushed in the end of transaction setCurrentFeature(aPrev, false); }