Salome HOME
Issue #1740 The visualization of selected point in the graphic scene is not visible
[modules/shaper.git] / src / BuildPlugin / BuildPlugin_SubShapes.cpp
index 000fb19e34cb48c77d0abdb621c4ee4416f3ae9e..0eaa6a2e73bd1f02e0cf0fca94d84d51c023049b 100644 (file)
@@ -42,10 +42,11 @@ void BuildPlugin_SubShapes::attributeChanged(const std::string& theID)
     if(!aShapeAttrSelection.get() || !aSubShapesAttrList.get()) {
       return;
     }
-    ResultPtr aContext = aShapeAttrSelection->context();
 
     aSubShapesAttrList->clear();
 
+    ResultPtr aContext = aShapeAttrSelection->context();
+
     GeomShapePtr aBaseShape = aShapeAttrSelection->value();
     if(!aBaseShape.get()) {
       return;
@@ -103,7 +104,7 @@ void BuildPlugin_SubShapes::execute()
 
   // Copy sub-shapes from list to new shape.
   if(!aShapesToAdd.empty()) {
-    aBuilder.add(aResultShape, aShapesToAdd);
+    aBuilder.addInternal(aResultShape, aShapesToAdd);
     aResultShape = aBuilder.shape();
   }
 
@@ -114,12 +115,13 @@ void BuildPlugin_SubShapes::execute()
   aResultBody->storeModified(aBaseShape, aResultShape);
   aResultBody->loadAndOrientModifiedShapes(&aBuilder, aBaseShape, GeomAPI_Shape::EDGE, aModEdgeTag,
                                           "Modified_Edge", *aBuilder.mapOfSubShapes().get());
-  for(ListOfShape::const_iterator anIt = aShapesToAdd.cbegin(); anIt != aShapesToAdd.cend(); ++anIt) {
+  for(ListOfShape::const_iterator
+      anIt = aShapesToAdd.cbegin(); anIt != aShapesToAdd.cend(); ++anIt) {
     GeomAPI_Shape::ShapeType aShType = (*anIt)->shapeType();
     aResultBody->loadAndOrientModifiedShapes(&aBuilder, *anIt, aShType,
-                                             aShType == GeomAPI_Shape::VERTEX ? aModVertexTag : aModEdgeTag,
-                                             aShType == GeomAPI_Shape::VERTEX ? "Modified_Vertex" : "Modified_Edge",
-                                             *aBuilder.mapOfSubShapes().get());
+                        aShType == GeomAPI_Shape::VERTEX ? aModVertexTag : aModEdgeTag,
+                        aShType == GeomAPI_Shape::VERTEX ? "Modified_Vertex" : "Modified_Edge",
+                        *aBuilder.mapOfSubShapes().get());
   }
   setResult(aResultBody);
 }