]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for issue #411: remove result shape to avoid the naming selection problem (select...
authormpv <mpv@opencascade.com>
Thu, 12 Mar 2015 13:34:21 +0000 (16:34 +0300)
committermpv <mpv@opencascade.com>
Thu, 12 Mar 2015 13:34:21 +0000 (16:34 +0300)
src/Model/Model_AttributeSelection.cpp

index b0b4d4b41d685bfab772d7c9875450b298100b0a..29c1b950f1d05e0fab739bbb33b88ceba99029f1 100644 (file)
@@ -373,9 +373,9 @@ void Model_AttributeSelection::selectBody(
   TopoDS_Shape aContext;
 
   ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(myRef.value());
-  if (aBody)
+  if (aBody) {
     aContext = aBody->shape()->impl<TopoDS_Shape>();
-  else {
+  else {
     ResultConstructionPtr aConstr = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(myRef.value());
     if (aConstr) {
       aContext = aConstr->shape()->impl<TopoDS_Shape>();
@@ -384,6 +384,11 @@ void Model_AttributeSelection::selectBody(
       return;
     }
   }
+  /// fix for issue 411: result modified shapes must not participate in this selection mechanism
+  FeaturePtr aFeatureOwner = std::dynamic_pointer_cast<ModelAPI_Feature>(owner());
+  if (aFeatureOwner.get())
+    aFeatureOwner->eraseResults();
+
   aSel.Select(aNewShape, aContext); 
 }