]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_WidgetMultiSelector.cpp
Salome HOME
Issue #1618 naming in sketch is broken: external object creation should use the shape...
[modules/shaper.git] / src / PartSet / PartSet_WidgetMultiSelector.cpp
index 13a832a688b19115b2351240c67db648d84fc446..f5e368bc983b66b40c62d6a2e4d913264c21dfb7 100755 (executable)
@@ -75,7 +75,7 @@ void PartSet_WidgetMultiSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr
   // there is no a sketch feature is selected, but the shape exists, try to create an exernal object
   // TODO: unite with the same functionality in PartSet_WidgetShapeSelector
   if (aSPFeature.get() == NULL) {
-    theObject = ObjectPtr();
+    ObjectPtr anExternalObject = ObjectPtr();
     if (myExternalObjectMgr->useExternal()) {
       GeomShapePtr aShape = theShape;
       if (!aShape.get()) {
@@ -84,7 +84,10 @@ void PartSet_WidgetMultiSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr
           aShape = aResult->shape();
       }
       if (aShape.get() != NULL && !aShape->isNull())
-        theObject = myExternalObjectMgr->externalObject(theObject, aShape, sketch(), myIsInValidate);
+        anExternalObject = myExternalObjectMgr->externalObject(theObject, aShape, sketch(), myIsInValidate);
     }
+    /// the object is null if the selected feature is "external"(not sketch entity feature of the
+    /// current sketch) and it is not created by object manager
+    theObject = anExternalObject;
   }
 }