]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1502 Select sub-solids in viewer : set selection priority for the owner less...
authornds <nds@opencascade.com>
Thu, 23 Jun 2016 09:05:29 +0000 (12:05 +0300)
committernds <nds@opencascade.com>
Thu, 23 Jun 2016 09:05:29 +0000 (12:05 +0300)
src/ModuleBase/ModuleBase_ResultPrs.cpp

index bf8e1b607d8db487b800a9a82c573ec967333d7e..09c65829a570da2f5a372d1da2cd6526d3f8ae11 100755 (executable)
@@ -119,7 +119,10 @@ void ModuleBase_ResultPrs::ComputeSelection(const Handle(SelectMgr_Selection)& a
       std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aCompSolid);
       if (aShapePtr.get()) {
         TopoDS_Shape aShape = aShapePtr->impl<TopoDS_Shape>();
-        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);