mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0027285: Visualization - selection of AIS_MultipleConnectedInteractive is broken
- method SelectMgr_SelectableObject::HasSelection became virtual, unnecessary variable was removed; - redefined HasSelection method for multiple connected interactives; - AIS_InteractiveContext::AddOrRemoveSelected was corrected to use global selection owner; - test case for issue #27285
This commit is contained in:
@@ -71,18 +71,16 @@ SelectMgr_SelectableObject::SelectMgr_SelectableObject (const PrsMgr_TypeOfPrese
|
||||
|
||||
|
||||
//==================================================
|
||||
// Function:
|
||||
// Function: HasSelection
|
||||
// Purpose :
|
||||
//==================================================
|
||||
|
||||
Standard_Boolean SelectMgr_SelectableObject
|
||||
::HasSelection(const Standard_Integer aMode) const
|
||||
Standard_Boolean SelectMgr_SelectableObject::HasSelection (const Standard_Integer theMode) const
|
||||
{
|
||||
Standard_Boolean Found=Standard_False;
|
||||
for (Standard_Integer I=1;I<= myselections.Length() && !Found;I++)
|
||||
{ if(((myselections.Value(I))->Mode())==aMode)
|
||||
return Standard_True;
|
||||
}
|
||||
for (Standard_Integer aSelIdx = 1; aSelIdx <= myselections.Length(); ++aSelIdx)
|
||||
{
|
||||
if (((myselections.Value (aSelIdx))->Mode()) == theMode)
|
||||
return Standard_True;
|
||||
}
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
|
@@ -95,8 +95,8 @@ public:
|
||||
Standard_EXPORT const Handle(SelectMgr_Selection)& Selection (const Standard_Integer aMode) const;
|
||||
|
||||
//! Returns true if a selection corresponding to the
|
||||
//! selection mode aMode is present in this framework.
|
||||
Standard_EXPORT Standard_Boolean HasSelection (const Standard_Integer aMode) const;
|
||||
//! selection mode theMode was computed for this object.
|
||||
Standard_EXPORT virtual Standard_Boolean HasSelection (const Standard_Integer theMode) const;
|
||||
|
||||
//! Begins the iteration scanning for sensitive primitives.
|
||||
void Init();
|
||||
|
Reference in New Issue
Block a user