From: mpv Date: Mon, 16 Sep 2019 08:34:31 +0000 (+0300) Subject: Fix the python dump of whole-results groups for specific test-case. X-Git-Tag: V9_4_0a2~4^2~95 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b7f954c1e5b9da1fc425908ac4edfebb513ebf23;p=modules%2Fshaper.git Fix the python dump of whole-results groups for specific test-case. --- diff --git a/src/CollectionAPI/CollectionAPI_Group.cpp b/src/CollectionAPI/CollectionAPI_Group.cpp index 98b6409d6..fae2ae36a 100644 --- a/src/CollectionAPI/CollectionAPI_Group.cpp +++ b/src/CollectionAPI/CollectionAPI_Group.cpp @@ -64,7 +64,7 @@ void CollectionAPI_Group::dump(ModelHighAPI_Dumper& theDumper) const AttributeSelectionListPtr anAttrList = aBase->selectionList(CollectionPlugin_Group::LIST_ID()); theDumper << aBase << " = model.addGroup(" << aDocName << ", "; - if (anAttrList->isWholeResultAllowed()) + if (anAttrList->isWholeResultAllowed() && !anAttrList->selectionType().empty()) theDumper<<"\""<selectionType()<<"\", "; theDumper << anAttrList; if (anAttrList->isGeometricalSelection()) diff --git a/src/ModelAPI/Test/TestSelectorShell.py b/src/ModelAPI/Test/TestSelectorShell.py index a699cbdb3..6d8f1c8e2 100644 --- a/src/ModelAPI/Test/TestSelectorShell.py +++ b/src/ModelAPI/Test/TestSelectorShell.py @@ -31,6 +31,7 @@ aBoxResult = Box_1.feature().results()[0] aShell = GeomAPI_ShapeExplorer(aBoxResult.shape(), GeomAPI_Shape.SHELL) aGroup = Part_1_doc.addFeature("Group") aGroup.selectionList("group_list").append(aBoxResult, aShell.current()) +aGroup.selectionList("group_list").setSelectionType("SHELL") # to compute the shape for the whole result selection correctly model.end() # check that the resulting group is correct