From: nds Date: Mon, 9 Nov 2015 05:16:32 +0000 (+0300) Subject: #816 In multi-rotation, be able to put the total angle or the step angle (Rotation... X-Git-Tag: V_2.0.0_alfa1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=229b929fc67912cafece1c9c53ee715de2a8703c;p=modules%2Fshaper.git #816 In multi-rotation, be able to put the total angle or the step angle (Rotation only) It must also be possible to enter the full angle value of the multi-rotation, with a toggle button defining the semantic of the angle value (either full rotation or between two consecutive repetitions). For consistency, it should be the same for multi-translation. --- diff --git a/src/SketchPlugin/SketchPlugin_MultiRotation.cpp b/src/SketchPlugin/SketchPlugin_MultiRotation.cpp index 9cd638ca6..274f8d64a 100755 --- a/src/SketchPlugin/SketchPlugin_MultiRotation.cpp +++ b/src/SketchPlugin/SketchPlugin_MultiRotation.cpp @@ -28,7 +28,7 @@ #define PI 3.1415926535897932 SketchPlugin_MultiRotation::SketchPlugin_MultiRotation() -: myBlockAngle(true) +: myBlockAngle(false) { } @@ -347,7 +347,6 @@ void SketchPlugin_MultiRotation::attributeChanged(const std::string& theID) } else if (theID == NUMBER_OF_OBJECTS_ID()) { if (attribute(NUMBER_OF_OBJECTS_ID())->isInitialized() && - attribute(ANGLE_FULL_ID())->isInitialized() && attribute(ANGLE_ID())->isInitialized() && attribute(ANGLE_TYPE())->isInitialized()) { AttributeStringPtr aMethodTypeAttr = string(ANGLE_TYPE()); diff --git a/src/SketchPlugin/SketchPlugin_Tools.cpp b/src/SketchPlugin/SketchPlugin_Tools.cpp index f6ff15edb..28d78bbd4 100644 --- a/src/SketchPlugin/SketchPlugin_Tools.cpp +++ b/src/SketchPlugin/SketchPlugin_Tools.cpp @@ -106,7 +106,7 @@ void updateMultiAttribute(const AttributePtr& theFirstAngleAttribute, const int& theValue, const bool toMultiply) { - if (theValue == 0) + if (theValue == 0 || !theFirstAngleAttribute->isInitialized()) return; AttributeDoublePtr aDoubleFirstAttr = std::dynamic_pointer_cast(