From a9eca5a92939203bd226162bf8267e92190fdfb4 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 16 Oct 2019 09:33:57 +0300 Subject: [PATCH] Issue #3043: Wrong behaviour of selection by filter in a second group Initialize the type of selection list with the default value if empty. --- 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 bb68bed95..0d04aeeb0 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -330,7 +330,9 @@ bool ModuleBase_WidgetMultiSelector::restoreValueCustom() if (aType == ModelAPI_AttributeSelectionList::typeId()) { // Restore shape type std::string aSelectionType = aSelectionListAttr->selectionType().c_str(); - if (!aSelectionType.empty()) { + if (aSelectionType.empty()) + aSelectionListAttr->setSelectionType(myDefMode); + else { setCurrentShapeType(ModuleBase_Tools::shapeType(aSelectionType.c_str())); myDefMode = aSelectionType; myIsFirst = false; -- 2.39.2