From: Sergey POKHODENKO Date: Fri, 15 May 2015 06:52:37 +0000 (+0300) Subject: Check selection type before setCurrentShapeType() in ModuleBase_WidgetMultiSelector... X-Git-Tag: V_1.2.0~145^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ddd0f1dd6b7534677f6b5216cf248932e9299f2f;p=modules%2Fshaper.git Check selection type before setCurrentShapeType() in ModuleBase_WidgetMultiSelector::restoreValue() --- diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index 225521501..0608ddeae 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -167,7 +167,8 @@ bool ModuleBase_WidgetMultiSelector::restoreValue() if (aSelectionListAttr) { // Restore shape type - setCurrentShapeType(ModuleBase_Tools::shapeType(aSelectionListAttr->selectionType().c_str())); + if (!aSelectionListAttr->selectionType().empty()) + setCurrentShapeType(ModuleBase_Tools::shapeType(aSelectionListAttr->selectionType().c_str())); updateSelectionList(aSelectionListAttr); return true; }