Salome HOME
Fix for import/export features
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintMirror.cpp
index 029200ff814e2205be9f937e75a154383067a6e9..03a3a90058b6d64fb63c7d64ed2961ef713d1c07 100644 (file)
@@ -135,8 +135,7 @@ void SketchPlugin_ConstraintMirror::execute()
       if (aMirrorIter != aMirroredList.end())
         break; // the lists are inconsistent
       // There is no mirrored object yet, create it
-      FeaturePtr aNewFeature = sketch()->addFeature(aFeatureIn->getKind());
-      aFeatureIn->data()->copyTo(aNewFeature->data());
+      FeaturePtr aNewFeature = SketchPlugin_Sketch::addUniqueNamedCopiedFeature(aFeatureIn, sketch());
       aNewFeature->execute();
       ModelAPI_EventCreator::get()->sendUpdated(aNewFeature, aRedisplayEvent);