Salome HOME
Copyright update 2022
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetDoubleValue.cpp
index c07a5f4b1d3cae63aeb73ab3a83149f2f7e8b95c..b6dc65443f1cdd964a9ff2dbb9d349aca4a9a351 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -172,7 +172,7 @@ bool ModuleBase_WidgetDoubleValue::storeValueCustom()
       // Nullyfy the parameter reference without deletion of the created
       myParameter = FeaturePtr();
     }
-    aReal->setText(aText.toStdString());
+    aReal->setText(aText.toStdWString());
   } else {
     // it is important to set the empty text value to the attribute before set the value
     // because setValue tries to calculate the attribute value according to the
@@ -181,7 +181,7 @@ bool ModuleBase_WidgetDoubleValue::storeValueCustom()
       aReal->setExpressionError("");
       aReal->setExpressionInvalid(false);
     }
-    aReal->setText("");
+    aReal->setText(L"");
     aReal->setValue(mySpinBox->value());
   }
   updateObject(myFeature);
@@ -192,9 +192,9 @@ bool ModuleBase_WidgetDoubleValue::restoreValueCustom()
 {
   DataPtr aData = myFeature->data();
   AttributeDoublePtr aRef = aData->real(attributeID());
-  std::string aTextRepr = aRef->text();
+  std::wstring aTextRepr = aRef->text();
   if (!aTextRepr.empty()) {
-    QString aText = QString::fromStdString(aTextRepr);
+    QString aText = QString::fromStdWString(aTextRepr);
     ModuleBase_Tools::setSpinText(mySpinBox, aText);
   }
   else {