]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #3043: Wrong behaviour of selection by filter in a second group
authorazv <azv@opencascade.com>
Wed, 16 Oct 2019 06:33:57 +0000 (09:33 +0300)
committerazv <azv@opencascade.com>
Wed, 16 Oct 2019 06:33:57 +0000 (09:33 +0300)
Initialize the type of selection list with the default value if empty.

src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp

index 43b380cf7a7fb69f41702d7c66cf187d61abc48c..337aa8acf4a4e246ccb969bfc5470dd4057de76f 100644 (file)
@@ -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;