From: azv Date: Fri, 14 Jun 2019 08:47:41 +0000 (+0300) Subject: Check sketch itself when storing the current feature while reexecuting features,... X-Git-Tag: VEDF2019Lot4~113 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ed5b51149d98491d5638cd63bb87ac598778de38;p=modules%2Fshaper.git Check sketch itself when storing the current feature while reexecuting features, which may produce additional sketch entities. --- diff --git a/src/SketchPlugin/SketchPlugin_Feature.cpp b/src/SketchPlugin/SketchPlugin_Feature.cpp index 9663e22c5..e006d6c6d 100644 --- a/src/SketchPlugin/SketchPlugin_Feature.cpp +++ b/src/SketchPlugin/SketchPlugin_Feature.cpp @@ -62,7 +62,10 @@ void SketchPlugin_Feature::keepCurrentFeature() FeaturePtr aCurFeature = document()->currentFeature(true); std::shared_ptr aSketchFeature = std::dynamic_pointer_cast(aCurFeature); - if (!aSketchFeature || aSketchFeature->sketch() == sketch()) + std::shared_ptr aSketch = + std::dynamic_pointer_cast(aCurFeature); + if ((!aSketchFeature || aSketchFeature->sketch() != sketch()) && + (!aSketch || aSketch.get() != sketch())) myCurrentFeature = aCurFeature; }