Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Oubli de traduction
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_WidgetShapeSelector.cpp
diff --git
a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
index e5ea9338995ae5ac20362446cbfc2a8d0a26f6f2..8673bb87c95b2d1202a3996678effa7c8b8c1e62 100644
(file)
--- a/
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
+++ b/
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
@@
-1,4
+1,4
@@
-// Copyright (C) 2014-20
19
CEA/DEN, EDF R&D
+// Copyright (C) 2014-20
21
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
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-216,24
+216,31
@@
void ModuleBase_WidgetShapeSelector::updateSelectionName()
bool isNameUpdated = false;
AttributeSelectionPtr aSelect = aData->selection(attributeID());
if (aSelect) {
bool isNameUpdated = false;
AttributeSelectionPtr aSelect = aData->selection(attributeID());
if (aSelect) {
- myTextLine->setText(QString::fromStdString(aSelect->namingName(getDefaultValue())));
+ std::wstring aDefault = translate(getDefaultValue()).toStdWString();
+ myTextLine->setText(QString::fromStdWString(aSelect->namingName(aDefault)));
isNameUpdated = true;
}
if (!isNameUpdated) {
ObjectPtr anObject = ModuleBase_Tools::getObject(myFeature->attribute(attributeID()));
if (anObject.get() != NULL) {
isNameUpdated = true;
}
if (!isNameUpdated) {
ObjectPtr anObject = ModuleBase_Tools::getObject(myFeature->attribute(attributeID()));
if (anObject.get() != NULL) {
- std::string aName = anObject->data()->name();
- myTextLine->setText(QString::fromStdString(aName));
+ std::
w
string aName = anObject->data()->name();
+ myTextLine->setText(QString::fromStd
W
String(aName));
} else {
AttributeRefAttrPtr aRefAttr = aData->refattr(attributeID());
if (aRefAttr && aRefAttr->attr().get() != NULL) {
//myIsObject = aRefAttr->isObject();
} else {
AttributeRefAttrPtr aRefAttr = aData->refattr(attributeID());
if (aRefAttr && aRefAttr->attr().get() != NULL) {
//myIsObject = aRefAttr->isObject();
- std::string anAttrName = ModuleBase_Tools::generateName(aRefAttr->attr(), myWorkshop);
- myTextLine->setText(QString::fromStdString(anAttrName));
+ std::
w
string anAttrName = ModuleBase_Tools::generateName(aRefAttr->attr(), myWorkshop);
+ myTextLine->setText(QString::fromStd
W
String(anAttrName));
}
else {
}
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