From 07101b8a602b93c59576a7ff63aa0abd1a076283 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 23 Jun 2016 12:05:29 +0300 Subject: [PATCH] Issue #1502 Select sub-solids in viewer : set selection priority for the owner less than for the sub-object. --- src/ModuleBase/ModuleBase_ResultPrs.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index bf8e1b607..09c65829a 100755 --- a/src/ModuleBase/ModuleBase_ResultPrs.cpp +++ b/src/ModuleBase/ModuleBase_ResultPrs.cpp @@ -119,7 +119,10 @@ void ModuleBase_ResultPrs::ComputeSelection(const Handle(SelectMgr_Selection)& a std::shared_ptr aShapePtr = ModelAPI_Tools::shape(aCompSolid); if (aShapePtr.get()) { TopoDS_Shape aShape = aShapePtr->impl(); - int aPriority = StdSelect_BRepSelectionTool::GetStandardPriority(aShape, TopAbs_SHAPE); + int aPriority = StdSelect_BRepSelectionTool::GetStandardPriority(aShape, TopAbs_COMPSOLID); + /// It is important to have priority for the shape of comp solid result less than priority + /// for the presentation shape which is a sub-result. Reason is to select the sub-objects before: #1592 + aPriority = aPriority - 1; double aDeflection = Prs3d::GetDeflection(aShape, myDrawer); Handle(ModuleBase_BRepOwner) aOwner = new ModuleBase_BRepOwner(aShape, aPriority); -- 2.39.2