From fa7f136934ebe487043670910dbf1f2816c5e513 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 30 Aug 2018 17:00:27 +0300 Subject: [PATCH] Issue #2507: Bug fix --- src/ModuleBase/ModuleBase_WidgetIntValue.cpp | 4 ++-- src/SketchPlugin/plugin-Sketch.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ModuleBase/ModuleBase_WidgetIntValue.cpp b/src/ModuleBase/ModuleBase_WidgetIntValue.cpp index b99e1d4eb..fa8a77159 100644 --- a/src/ModuleBase/ModuleBase_WidgetIntValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetIntValue.cpp @@ -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); diff --git a/src/SketchPlugin/plugin-Sketch.xml b/src/SketchPlugin/plugin-Sketch.xml index 72e0ef181..82656539a 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -623,7 +623,7 @@ email : webmaster.salome@opencascade.com @@ -638,7 +638,7 @@ email : webmaster.salome@opencascade.com -- 2.39.2