Salome HOME
Merge remote-tracking branch 'remotes/origin/occ/19115' into fixes_for_950
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetShapeSelector.cpp
index e5ea9338995ae5ac20362446cbfc2a8d0a26f6f2..89c506e8616a6ab567b72501212f57e68f76ff70 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  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
@@ -216,7 +216,8 @@ void ModuleBase_WidgetShapeSelector::updateSelectionName()
   bool isNameUpdated = false;
   AttributeSelectionPtr aSelect = aData->selection(attributeID());
   if (aSelect) {
-    myTextLine->setText(QString::fromStdString(aSelect->namingName(getDefaultValue())));
+    std::string aDefault = translate(getDefaultValue()).toStdString();
+    myTextLine->setText(QString::fromStdString(aSelect->namingName(aDefault)));
     isNameUpdated = true;
   }
   if (!isNameUpdated) {
@@ -232,8 +233,14 @@ void ModuleBase_WidgetShapeSelector::updateSelectionName()
         myTextLine->setText(QString::fromStdString(anAttrName));
       }
       else {
-        myTextLine->setText(getDefaultValue().c_str());
+        myTextLine->setText(translate(getDefaultValue()));
       }
     }
   }
 }
+
+//********************************************************************
+bool ModuleBase_WidgetShapeSelector::isModified() const
+{
+  return !myTextLine->text().isEmpty();
+}
\ No newline at end of file