mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0028527: Visualization, AIS_InteractiveContext - custom selection presentation is never removed from View
This commit is contained in:
parent
a743814be9
commit
905b0e3175
@ -2336,6 +2336,9 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& t
|
|||||||
clearDynamicHighlight();
|
clearDynamicHighlight();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure highlighting presentations are properly erased
|
||||||
|
theIObj->ErasePresentations (false);
|
||||||
|
|
||||||
if (IsSelected (theIObj)
|
if (IsSelected (theIObj)
|
||||||
&& aStatus->DisplayMode() != aDispMode)
|
&& aStatus->DisplayMode() != aDispMode)
|
||||||
{
|
{
|
||||||
@ -2396,6 +2399,7 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t
|
|||||||
unhighlightOwners (theIObj);
|
unhighlightOwners (theIObj);
|
||||||
|
|
||||||
myMainPM->Erase (theIObj, -1);
|
myMainPM->Erase (theIObj, -1);
|
||||||
|
theIObj->ErasePresentations (true); // make sure highlighting presentations are properly erased
|
||||||
|
|
||||||
// Object removes from Detected sequence
|
// Object removes from Detected sequence
|
||||||
Standard_DISABLE_DEPRECATION_WARNINGS
|
Standard_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
@ -378,6 +378,32 @@ Handle(Prs3d_Presentation) SelectMgr_SelectableObject::GetSelectPresentation (co
|
|||||||
return mySelectionPrs;
|
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
|
//function : SetZLayer
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -169,6 +169,9 @@ public:
|
|||||||
|
|
||||||
Standard_EXPORT Handle(Prs3d_Presentation) GetSelectPresentation (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.
|
//! 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.
|
//! 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;
|
Standard_EXPORT virtual void SetZLayer (const Graphic3d_ZLayerId theLayerId) Standard_OVERRIDE;
|
||||||
@ -219,14 +222,15 @@ protected:
|
|||||||
|
|
||||||
SelectMgr_SequenceOfSelection myselections;
|
SelectMgr_SequenceOfSelection myselections;
|
||||||
Handle(SelectMgr_EntityOwner) myAssemblyOwner;
|
Handle(SelectMgr_EntityOwner) myAssemblyOwner;
|
||||||
|
Handle(Prs3d_Presentation) mySelectionPrs;
|
||||||
|
Handle(Prs3d_Presentation) myHilightPrs;
|
||||||
Standard_Boolean myAutoHilight;
|
Standard_Boolean myAutoHilight;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Standard_Integer mycurrent;
|
Standard_Integer mycurrent;
|
||||||
Handle(Prs3d_Presentation) mySelectionPrs;
|
|
||||||
Handle(Prs3d_Presentation) myHilightPrs;
|
|
||||||
Standard_Integer myGlobalSelMode;
|
Standard_Integer myGlobalSelMode;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _SelectMgr_SelectableObject_HeaderFile
|
#endif // _SelectMgr_SelectableObject_HeaderFile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user