Salome HOME
COPY attribute in SketchEntity now persistent
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_SketchEntity.cpp
index 9e95496ef455fa95572ba3c4f53c1a0c82b3ac47..f29dfc1391dfe661ce98ec2f780e2107b77a71ed 100644 (file)
@@ -15,4 +15,14 @@ void SketchPlugin_SketchEntity::initAttributes()
 {
   data()->addAttribute(AUXILIARY_ID(), ModelAPI_AttributeBoolean::typeId());
   ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), AUXILIARY_ID());
+
+  initDerivedClassAttributes();
+
+  AttributePtr anAttr = data()->addAttribute(SketchPlugin_SketchEntity::COPY_ID(), ModelAPI_AttributeBoolean::typeId());
+  anAttr->setIsArgument(false);
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), SketchPlugin_SketchEntity::COPY_ID());
+  AttributeBooleanPtr anAttrBool = std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(anAttr);
+  if(anAttr.get()) {
+    anAttrBool->setValue(false);
+  }
 }