Salome HOME
Update unit tests for the PlaneGCS solver. Bug fixes.
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Sketch.cpp
index a63344e58fda66b21299919bd574339b87b9fcad..739f347bfd3b0077ec7b43fb087591c8c70632ba 100644 (file)
@@ -297,7 +297,8 @@ void SketchPlugin_Sketch::createPoint2DResult(ModelAPI_Feature* theFeature,
 }
 
 FeaturePtr SketchPlugin_Sketch::addUniqueNamedCopiedFeature(FeaturePtr theFeature,
-                                                            SketchPlugin_Sketch* theSketch)
+                                                            SketchPlugin_Sketch* theSketch,
+                                                            const bool theIsCopy)
 {
   FeaturePtr aNewFeature = theSketch->addFeature(theFeature->getKind());
   // addFeature generates a unique name for the feature, it caches the name
@@ -308,6 +309,11 @@ FeaturePtr SketchPlugin_Sketch::addUniqueNamedCopiedFeature(FeaturePtr theFeatur
   aNewFeature->data()->setName(aUniqueFeatureName);
   // text expressions could block setValue of some attributes
   SketchPlugin_Tools::clearExpressions(aNewFeature);
+  // Set copy attribute
+  AttributeBooleanPtr anAttr = aNewFeature->data()->boolean(SketchPlugin_SketchEntity::COPY_ID());
+  if(anAttr.get()) {
+    anAttr->setValue(theIsCopy);
+  }
 
   return aNewFeature;
 }