]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Check selection type before setCurrentShapeType() in ModuleBase_WidgetMultiSelector...
authorSergey POKHODENKO <sergey.pokhodenko@opencascade.com>
Fri, 15 May 2015 06:52:37 +0000 (09:52 +0300)
committerSergey POKHODENKO <sergey.pokhodenko@opencascade.com>
Tue, 19 May 2015 07:58:19 +0000 (10:58 +0300)
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp

index 2255215011c0e31383e9401a0071c37c674c13d7..0608ddeae862ffc8bc5a74bbfa1d7ccf2159709e 100644 (file)
@@ -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;
   }