Salome HOME
Regression about not-external object in sketch: create sketch, line, start arc creati...
authornds <nds@opencascade.com>
Thu, 23 Jun 2016 17:21:41 +0000 (20:21 +0300)
committernds <nds@opencascade.com>
Thu, 23 Jun 2016 17:21:41 +0000 (20:21 +0300)
src/PartSet/PartSet_WidgetMultiSelector.cpp
src/PartSet/PartSet_WidgetShapeSelector.cpp

index 60059f31ff5af031d4522aff51b75f5c06444f68..13a832a688b19115b2351240c67db648d84fc446 100755 (executable)
@@ -74,16 +74,17 @@ void PartSet_WidgetMultiSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr
           std::dynamic_pointer_cast<SketchPlugin_Feature>(aSelectedFeature);
   // 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)
+  if (aSPFeature.get() == NULL) {
     theObject = ObjectPtr();
-  if (myExternalObjectMgr->useExternal()) {
-    GeomShapePtr aShape = theShape;
-    if (!aShape.get()) {
-      ResultPtr aResult = myWorkshop->selection()->getResult(thePrs);
-      if (aResult.get())
-        aShape = aResult->shape();
+    if (myExternalObjectMgr->useExternal()) {
+      GeomShapePtr aShape = theShape;
+      if (!aShape.get()) {
+        ResultPtr aResult = myWorkshop->selection()->getResult(thePrs);
+        if (aResult.get())
+          aShape = aResult->shape();
+      }
+      if (aShape.get() != NULL && !aShape->isNull())
+        theObject = myExternalObjectMgr->externalObject(theObject, aShape, sketch(), myIsInValidate);
     }
-    if (aShape.get() != NULL && !aShape->isNull())
-      theObject = myExternalObjectMgr->externalObject(theObject, aShape, sketch(), myIsInValidate);
   }
 }
index 7490a8510780e7db0b71490c941c90dc53a3923c..a502fcdfa0cda24aa8c07f54eb5e3d53c7ef80bc 100755 (executable)
@@ -78,17 +78,18 @@ void PartSet_WidgetShapeSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr
           std::dynamic_pointer_cast<SketchPlugin_Feature>(aSelectedFeature);
   // 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)
+  if (aSPFeature.get() == NULL) {
     theObject = ObjectPtr();
-  if (myExternalObjectMgr->useExternal()) {
-    GeomShapePtr aShape = theShape;
-    if (!aShape.get()) {
-      ResultPtr aResult = myWorkshop->selection()->getResult(thePrs);
-      if (aResult.get())
-        aShape = aResult->shape();
+    if (myExternalObjectMgr->useExternal()) {
+      GeomShapePtr aShape = theShape;
+      if (!aShape.get()) {
+        ResultPtr aResult = myWorkshop->selection()->getResult(thePrs);
+        if (aResult.get())
+          aShape = aResult->shape();
+      }
+      if (aShape.get() != NULL && !aShape->isNull())
+        theObject = myExternalObjectMgr->externalObject(theObject, aShape, sketch(), myIsInValidate);
     }
-    if (aShape.get() != NULL && !aShape->isNull())
-      theObject = myExternalObjectMgr->externalObject(theObject, aShape, sketch(), myIsInValidate);
   }
 }