From fa4e6fb0c6d37eeaf7ad1a18ad6d8bd0919aaa46 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 3 Feb 2016 16:55:26 +0300 Subject: [PATCH] A regression correction for the following case: Create part, create Extrusion, result is an error message about not correct shape type(empty value). --- src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.39.2