From: mpv Date: Thu, 17 Sep 2015 10:51:28 +0000 (+0300) Subject: Fix for generation of ExtrusionSketch preview while the nested sketch element is... X-Git-Tag: V_1.4.0~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d27177cb4cba8931208fd57fb2617f39aaf15bbf;p=modules%2Fshaper.git Fix for generation of ExtrusionSketch preview while the nested sketch element is modified. --- diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 417a3de14..a9e917215 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -278,8 +278,13 @@ void Model_Update::updateFeature(FeaturePtr theFeature) return; // do not execute the composite that contains the current - //CompositeFeaturePtr aMain = std::dynamic_pointer_cast(theFeature); - //bool isPostponedMain = aMain.get() && aMain->isSub(theFeature->document()->currentFeature(false)); + bool isPostponedMain = false; + CompositeFeaturePtr aMain = std::dynamic_pointer_cast(theFeature); + if (theFeature->getKind() == "ExtrusionSketch" && aMain.get()) { + CompositeFeaturePtr aCurrentOwner = + ModelAPI_Tools::compositeOwner(theFeature->document()->currentFeature(false)); + isPostponedMain = aCurrentOwner.get() && aMain->isSub(aCurrentOwner); + } #ifdef DEB_UPDATE std::cout<<"Update Feature "<name()<data()->execState(); if (aFactory->validate(theFeature)) { - //if (!isPostponedMain) { + if (!isPostponedMain) { #ifdef DEB_UPDATE std::cout<<"Execute Feature "<name()<name()<