- 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);
+ }