1
0
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:
vpa
2016-03-18 14:26:07 +03:00
committed by bugmaster
parent 1511c7e90f
commit 7411850ad7
6 changed files with 64 additions and 19 deletions

View File

@@ -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;
}

View File

@@ -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();