clearDynamicHighlight();
}
+ // make sure highlighting presentations are properly erased
+ theIObj->ErasePresentations (false);
+
if (IsSelected (theIObj)
&& aStatus->DisplayMode() != aDispMode)
{
unhighlightOwners (theIObj);
myMainPM->Erase (theIObj, -1);
+ theIObj->ErasePresentations (true); // make sure highlighting presentations are properly erased
// Object removes from Detected sequence
Standard_DISABLE_DEPRECATION_WARNINGS
return mySelectionPrs;
}
+//=======================================================================
+//function : ErasePresentations
+//purpose :
+//=======================================================================
+void SelectMgr_SelectableObject::ErasePresentations (Standard_Boolean theToRemove)
+{
+ if (!mySelectionPrs.IsNull())
+ {
+ mySelectionPrs->Erase();
+ if (theToRemove)
+ {
+ mySelectionPrs->Clear();
+ mySelectionPrs.Nullify();
+ }
+ }
+ if (!myHilightPrs.IsNull())
+ {
+ myHilightPrs->Erase();
+ if (theToRemove)
+ {
+ myHilightPrs->Clear();
+ myHilightPrs.Nullify();
+ }
+ }
+}
+
//=======================================================================
//function : SetZLayer
//purpose :
Standard_EXPORT Handle(Prs3d_Presentation) GetHilightPresentation (const Handle(PrsMgr_PresentationManager3d)& TheMgr);
Standard_EXPORT Handle(Prs3d_Presentation) GetSelectPresentation (const Handle(PrsMgr_PresentationManager3d)& TheMgr);
-
+
+ //! Removes presentations returned by GetHilightPresentation() and GetSelectPresentation().
+ Standard_EXPORT virtual void ErasePresentations (Standard_Boolean theToRemove);
+
//! Set Z layer ID and update all presentations of the selectable object.
//! The layers mechanism allows drawing objects in higher layers in overlay of objects in lower layers.
Standard_EXPORT virtual void SetZLayer (const Graphic3d_ZLayerId theLayerId) Standard_OVERRIDE;
SelectMgr_SequenceOfSelection myselections;
Handle(SelectMgr_EntityOwner) myAssemblyOwner;
+ Handle(Prs3d_Presentation) mySelectionPrs;
+ Handle(Prs3d_Presentation) myHilightPrs;
Standard_Boolean myAutoHilight;
private:
Standard_Integer mycurrent;
- Handle(Prs3d_Presentation) mySelectionPrs;
- Handle(Prs3d_Presentation) myHilightPrs;
Standard_Integer myGlobalSelMode;
+
};
#endif // _SelectMgr_SelectableObject_HeaderFile