myFlyoutUpdate = false;
}
else if (theID == SketchPlugin_ConstraintAngle::TYPE_ID()) {
- double anAngle = calculateAngle();
std::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = std::dynamic_pointer_cast<
- ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_ConstraintAngle::VALUE()));
- aValueAttr->setValue(anAngle);
+ ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID()));
+ double anAngle = calculateAngle();
+ if (aValueAttr->text().empty())
+ aValueAttr->setValue(anAngle);
+ else {
+ aValueAttr = std::dynamic_pointer_cast<
+ ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_ConstraintAngle::VALUE()));
+ aValueAttr->setValue(anAngle);
+ }
}
else if (theID == SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID()) {
updateConstraintValueByAngleValue();