]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
A regression correction for the following case:
authornds <nds@opencascade.com>
Wed, 3 Feb 2016 13:55:26 +0000 (16:55 +0300)
committernds <nds@opencascade.com>
Wed, 3 Feb 2016 13:55:26 +0000 (16:55 +0300)
Create part, create Extrusion, result is an error message about not correct shape type(empty value).

src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp

index 8f083325092901a9055f7f5552f0b0d14d9605c8..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;