Salome HOME
registerNotObligatory is not necessary if this property is set in XML.
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetMultiSelector.cpp
index af47d9d7c734ed4acd0497114c107ed2e0cb3422..9acca5255469efb03ff16b333712b22663b630ca 100755 (executable)
@@ -207,7 +207,9 @@ bool ModuleBase_WidgetMultiSelector::restoreValueCustom()
   if (aType == ModelAPI_AttributeSelectionList::typeId()) {
     AttributeSelectionListPtr aSelectionListAttr = myFeature->data()->selectionList(attributeID());
     // Restore shape type
-    setCurrentShapeType(ModuleBase_Tools::shapeType(aSelectionListAttr->selectionType().c_str()));
+    std::string aSelectionType = aSelectionListAttr->selectionType().c_str();
+    if (!aSelectionType.empty())
+      setCurrentShapeType(ModuleBase_Tools::shapeType(aSelectionType.c_str()));
   }
   updateSelectionList();
   return true;
@@ -539,7 +541,7 @@ void ModuleBase_WidgetMultiSelector::updateSelectionList()
       AttributePtr anAttribute = aRefAttrListAttr->attribute(i);
       QString aName;
       if (anAttribute.get()) {
-        std::string anAttrName = generateName(anAttribute);
+        std::string anAttrName = generateName(anAttribute, myWorkshop);
         aName = QString::fromStdString(anAttrName);
       }
       else {