X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetLabelValue.cpp;h=9037e84ebb0552b5f9c1955e588c52d0c32fe9db;hb=2cade87faaf69a42f5f4d5791d1e5de3f5f5044b;hp=aafbb4ba2e07ac20d164aef0e290c9f460e2ce67;hpb=045e6d867c97a06a882b5834179ccf97fcaa7cf1;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetLabelValue.cpp b/src/ModuleBase/ModuleBase_WidgetLabelValue.cpp index aafbb4ba2..9037e84eb 100644 --- a/src/ModuleBase/ModuleBase_WidgetLabelValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetLabelValue.cpp @@ -28,6 +28,12 @@ ModuleBase_WidgetLabelValue::ModuleBase_WidgetLabelValue(QWidget* theParent, QString aToolTip = QString::fromStdString(theData->widgetTooltip()); myLabel = new ModuleBase_LabelValue(theParent, aText, aToolTip, aLabelIcon); + bool isOk; + double aDefVal = QString::fromStdString(getDefaultValue()).toDouble(&isOk); + if (isOk) { + myLabel->setValue(aDefVal); + } + aLayout->addWidget(myLabel); } @@ -37,7 +43,9 @@ ModuleBase_WidgetLabelValue::~ModuleBase_WidgetLabelValue() QList ModuleBase_WidgetLabelValue::getControls() const { - return QList(); + QList aControls; + aControls.append(myLabel); + return aControls; } bool ModuleBase_WidgetLabelValue::restoreValueCustom()