]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
#816 In multi-rotation, be able to put the total angle or the step angle (Rotation...
authornds <nds@opencascade.com>
Mon, 9 Nov 2015 05:16:32 +0000 (08:16 +0300)
committernds <nds@opencascade.com>
Mon, 9 Nov 2015 05:16:32 +0000 (08:16 +0300)
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
src/SketchPlugin/SketchPlugin_Tools.cpp

index 9cd638ca69d329375b9ce49ee7b27c6eb6cedb5a..274f8d64a03c6346e99f83a3999891b88e407775 100755 (executable)
@@ -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());
index f6ff15edb4bfeff1d095222bff78caddd58f66b5..28d78bbd490f38abe1d06345eb2aa1dd7118c098 100644 (file)
@@ -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<ModelAPI_AttributeDouble>(