Salome HOME
Constuction sketch entity attribute.
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Circle.cpp
index 5fde3dfbe18e4b4cde24868d3243e14786e7a934..50b387414b82402e10bec366908b2d2d856f24fa 100644 (file)
 #include <GeomAlgoAPI_CompoundBuilder.h>
 
 SketchPlugin_Circle::SketchPlugin_Circle()
-    : SketchPlugin_Feature()
+    : SketchPlugin_SketchEntity()
 {
 }
 
 void SketchPlugin_Circle::initAttributes()
 {
+  SketchPlugin_SketchEntity::initAttributes();
+
   data()->addAttribute(CENTER_ID(), GeomDataAPI_Point2D::type());
   data()->addAttribute(RADIUS_ID(), ModelAPI_AttributeDouble::type());
   data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::type());
@@ -99,7 +101,7 @@ double SketchPlugin_Circle::distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>
 }
 
 bool SketchPlugin_Circle::isFixed() {
-  return data()->selection(EXTERNAL_ID())->context();
+  return data()->selection(EXTERNAL_ID())->context().get();
 }
 
 void SketchPlugin_Circle::attributeChanged(const std::string& theID) {