]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Check sketch itself when storing the current feature while reexecuting features,...
authorazv <azv@opencascade.com>
Fri, 14 Jun 2019 08:47:41 +0000 (11:47 +0300)
committerazv <azv@opencascade.com>
Fri, 14 Jun 2019 08:48:01 +0000 (11:48 +0300)
src/SketchPlugin/SketchPlugin_Feature.cpp

index 9663e22c5db4c0bd23129bc759cae82ba2dc24aa..e006d6c6de5b8afca5f8271ef7dba420ef527b5f 100644 (file)
@@ -62,7 +62,10 @@ void SketchPlugin_Feature::keepCurrentFeature()
   FeaturePtr aCurFeature = document()->currentFeature(true);
   std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
       std::dynamic_pointer_cast<SketchPlugin_Feature>(aCurFeature);
-  if (!aSketchFeature || aSketchFeature->sketch() == sketch())
+  std::shared_ptr<SketchPlugin_Sketch> aSketch =
+      std::dynamic_pointer_cast<SketchPlugin_Sketch>(aCurFeature);
+  if ((!aSketchFeature || aSketchFeature->sketch() != sketch()) &&
+      (!aSketch || aSketch.get() != sketch()))
     myCurrentFeature = aCurFeature;
 }