Salome HOME
Deleted check after build for transformations.
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetDoubleValue.cpp
index 9dc18d5981db4b0c238bdf77e58dcb2c4787bac8..f868e04bcc82ac12c04890e3b522d98da44edb4b 100644 (file)
@@ -26,7 +26,7 @@
 #include <cfloat>
 
 #ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623158e+308 
+#define DBL_MAX 1.7976931348623158e+308
 #endif
 #ifdef _DEBUG
 #include <iostream>
@@ -41,7 +41,7 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent,
   QFormLayout* aControlLay = new QFormLayout(this);
   ModuleBase_Tools::adjustMargins(aControlLay);
 
-  QString aLabelText = QString::fromStdString(theData->widgetLabel());
+  QString aLabelText = translate(theData->widgetLabel());
   QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
   myLabel = new QLabel(aLabelText, this);
   if (!aLabelIcon.isEmpty())
@@ -86,12 +86,13 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent,
     mySpinBox->setValue(aDefVal);
   }
 
-  QString aTTip = QString::fromStdString(theData->widgetTooltip());
+  QString aTTip = translate(theData->widgetTooltip());
   mySpinBox->setToolTip(aTTip);
   myLabel->setToolTip(aTTip);
 
   aControlLay->addRow(myLabel, mySpinBox);
-  connect(mySpinBox, SIGNAL(valueChanged(const QString&)), this, SIGNAL(valuesModified()));
+  // we should listen textChanged signal as valueChanged do not send when text is modified
+  connect(mySpinBox, SIGNAL(textChanged(const QString&)), this, SIGNAL(valuesModified()));
   mySpinBox->setValueEnabled(isValueEnabled());
 }