From: azv Date: Thu, 28 Apr 2016 11:06:44 +0000 (+0300) Subject: Assign initial angle value as is (issue #1449) X-Git-Tag: V_2.3.0~80^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2ffa875bca79e9c80eb987d10f189adc6444257d;p=modules%2Fshaper.git Assign initial angle value as is (issue #1449) --- diff --git a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp index aa3d392c4..8fb29c48c 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp @@ -174,6 +174,10 @@ double SketchPlugin_ConstraintAngle::calculateAngle() anAng = std::shared_ptr(new GeomAPI_Angle2d(aLine1, isReversed1, aLine2, isReversed2)); } double anAngle = anAng->angleDegree(); + std::shared_ptr aValueAttr = std::dynamic_pointer_cast< + ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_ConstraintAngle::VALUE())); + if (!aValueAttr->isInitialized()) + aValueAttr->setValue(anAngle); /// an angle value should be corrected by the current angle type anAngle = getAngleForType(anAngle); boolean(ANGLE_REVERSED_FIRST_LINE_ID())->setValue(anAng->isReversed(0));