Salome HOME
Issue #2507: Bug fix
authorvsv <vsv@opencascade.com>
Thu, 30 Aug 2018 14:00:27 +0000 (17:00 +0300)
committervsv <vsv@opencascade.com>
Thu, 30 Aug 2018 14:00:51 +0000 (17:00 +0300)
src/ModuleBase/ModuleBase_WidgetIntValue.cpp
src/SketchPlugin/plugin-Sketch.xml

index b99e1d4ebabe7357c48008869f01e960710031fa..fa8a77159e5bff3469b4e816fa4e245c5359f3eb 100644 (file)
@@ -92,7 +92,7 @@ ModuleBase_WidgetIntValue::ModuleBase_WidgetIntValue(QWidget* theParent,
   }
 
   myDefVal = QString::fromStdString(getDefaultValue()).toInt(&myHasDefault);
-  if (isOk)
+  if (myHasDefault)
     mySpinBox->setValue(myDefVal);
 
   QString aTTip = translate(theData->widgetTooltip());
@@ -199,7 +199,7 @@ bool ModuleBase_WidgetIntValue::restoreValueCustom()
     ModuleBase_Tools::setSpinText(mySpinBox, aText);
   } else {
     ModuleBase_Tools::setSpinValue(mySpinBox,
-      anAttribute->isInitialized() ? anAttribute->value() : 0);
+      anAttribute->isInitialized() ? anAttribute->value() : myDefVal);
     if (anAttribute->isInitialized() && anAttribute->expressionInvalid()) {
       anAttribute->setExpressionError("");
       anAttribute->setExpressionInvalid(false);
index 72e0ef18176ef33f4d593a26c5ce53f34145c5b7..82656539a5888d17bff8288200514acb204ae368 100644 (file)
@@ -623,7 +623,7 @@ email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com
                          label="Angle"
                          icon="icons/Sketch/angle.png"
                          tooltip="Rotation angle"
-                         default="270" min="0" max="360"
+                         default="360" min="0" max="360"
                          use_reset="false">
               <validator id="SketchPlugin_MultiRotationAngleValidator" />
             </doublevalue>
@@ -638,7 +638,7 @@ email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com
                          label="Angle"
                          icon="icons/Sketch/angle.png"
                          tooltip="Rotation angle"
-                         default="270" min="0" max="360"
+                         default="90" min="0" max="360"
                          use_reset="false">
               <validator id="SketchPlugin_MultiRotationAngleValidator" />
             </doublevalue>