From ddd0f1dd6b7534677f6b5216cf248932e9299f2f Mon Sep 17 00:00:00 2001 From: Sergey POKHODENKO Date: Fri, 15 May 2015 09:52:37 +0300 Subject: [PATCH] Check selection type before setCurrentShapeType() in ModuleBase_WidgetMultiSelector::restoreValue() --- src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.2