// text expressions could block setValue of some attributes
SketchPlugin_Tools::clearExpressions(aNewFeature);
// Set copy attribute
+ std::shared_ptr<ModelAPI_AttributeBoolean> anAttr = aNewFeature->data()->boolean(SketchPlugin_SketchEntity::COPY_ID());
+ if(!anAttr.get()) {
+ aNewFeature->data()->addAttribute(SketchPlugin_SketchEntity::COPY_ID(), ModelAPI_AttributeBoolean::typeId());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(aNewFeature->getKind(), SketchPlugin_SketchEntity::COPY_ID());
+ }
aNewFeature->data()->boolean(SketchPlugin_SketchEntity::COPY_ID())->setValue(theIsCopy);
return aNewFeature;
void SketchPlugin_SketchEntity::initAttributes()
{
data()->addAttribute(AUXILIARY_ID(), ModelAPI_AttributeBoolean::typeId());
- data()->addAttribute(COPY_ID(), ModelAPI_AttributeBoolean::typeId());
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), AUXILIARY_ID());
- ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), COPY_ID());
}