0029947: Visualization - SelectMgr_SelectableObject::GetSelectPresentation() should...
[occt.git] / src / SelectMgr / SelectMgr_SelectableObject.cxx
index 14f4d61..e9e48bb 100644 (file)
@@ -348,6 +348,7 @@ Handle(Prs3d_Presentation) SelectMgr_SelectableObject::GetHilightPresentation (c
   {
     myHilightPrs = new Prs3d_Presentation (theMgr->StructureManager());
     myHilightPrs->SetTransformPersistence (TransformPersistence());
+    myHilightPrs->SetClipPlanes (myClipPlanes);
   }
 
   return myHilightPrs;
@@ -364,6 +365,7 @@ Handle(Prs3d_Presentation) SelectMgr_SelectableObject::GetSelectPresentation (co
   {
     mySelectionPrs = new Prs3d_Presentation (theMgr->StructureManager());
     mySelectionPrs->SetTransformPersistence (TransformPersistence());
+    mySelectionPrs->SetClipPlanes (myClipPlanes);
   }
 
   return mySelectionPrs;
@@ -428,6 +430,23 @@ void SelectMgr_SelectableObject::SetZLayer (const Graphic3d_ZLayerId theLayerId)
   }
 }
 
+//=======================================================================
+//function : UpdateClipping
+//purpose  :
+//=======================================================================
+void SelectMgr_SelectableObject::UpdateClipping()
+{
+  PrsMgr_PresentableObject::UpdateClipping();
+  if (!mySelectionPrs.IsNull())
+  {
+    mySelectionPrs->SetClipPlanes (myClipPlanes);
+  }
+  if (!myHilightPrs.IsNull())
+  {
+    myHilightPrs->SetClipPlanes (myClipPlanes);
+  }
+}
+
 //=======================================================================
 //function : updateSelection
 //purpose  : Sets update status FULL to selections of the object. Must be