Salome HOME
Copyright update 2022
[modules/shaper.git] / src / SketchAPI / SketchAPI_MacroEllipticArc.cpp
index 4702bc84b72ce9a6aa0e96a23f05661e343174dc..5ba07decd8be236146995e1231c24fcd07607a30 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -58,8 +58,8 @@ static void fillAttribute(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint,
   fillAttribute(aPoint, thePointAttr);
 }
 
-SketchAPI_MacroEllipticArc::SketchAPI_MacroEllipticArc(const std::shared_ptr<ModelAPI_Feature>& theFeature)
-  : SketchAPI_MacroEllipse(theFeature)
+SketchAPI_MacroEllipticArc::SketchAPI_MacroEllipticArc(const FeaturePtr& theFeature)
+  : SketchAPI_MacroEllipse(theFeature, false)
 {
 }
 
@@ -74,7 +74,7 @@ SketchAPI_MacroEllipticArc::SketchAPI_MacroEllipticArc(
     const std::shared_ptr<GeomAPI_Pnt2d>&    theArcEnd,
     const ModelHighAPI_RefAttr&              theArcEndRef,
     const bool                               theReversed)
-  : SketchAPI_MacroEllipse(theFeature)
+  : SketchAPI_MacroEllipse(theFeature, false)
 {
   if (initialize()) {
     fillAttribute(theCenter, theCenterRef,
@@ -86,6 +86,7 @@ SketchAPI_MacroEllipticArc::SketchAPI_MacroEllipticArc(
 
     fillAttribute(theReversed, reversed());
 
+    storeSketch(theFeature);
     execute();
   }
 }