From 229b929fc67912cafece1c9c53ee715de2a8703c Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 9 Nov 2015 08:16:32 +0300 Subject: [PATCH] #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. --- src/SketchPlugin/SketchPlugin_MultiRotation.cpp | 3 +-- src/SketchPlugin/SketchPlugin_Tools.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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( -- 2.39.2