From: nds Date: Wed, 3 Feb 2016 13:55:26 +0000 (+0300) Subject: A regression correction for the following case: X-Git-Tag: V_2.2.0~159 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=506e4ffc104851532c7ba39e50d492a6f6ca5ee6;p=modules%2Fshaper.git A regression correction for the following case: Create part, create Extrusion, result is an error message about not correct shape type(empty value). --- diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index 8f0833250..9acca5255 100755 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -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;