From: nds Date: Thu, 23 Jun 2016 09:05:29 +0000 (+0300) Subject: Issue #1502 Select sub-solids in viewer : set selection priority for the owner less... X-Git-Tag: V_2.4.0~37 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=07101b8a602b93c59576a7ff63aa0abd1a076283;p=modules%2Fshaper.git Issue #1502 Select sub-solids in viewer : set selection priority for the owner less than for the sub-object. --- 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);