1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-06-05 11:24:17 +03:00

0033575: Visualization - Volume selection of labels add repeated instances of the same object to selection list.

Modified logic to add selectable object in SelectMgr_ViewerSelector::checkOverlap.
This commit is contained in:
drochalo 2024-01-19 12:32:34 +00:00
parent 072c986e7d
commit d272ad9089

View File

@ -296,7 +296,24 @@ void SelectMgr_ViewerSelector::checkOverlap (const Handle(Select3D_SensitiveEnti
{
aCriterion.NbOwnerMatches = 1;
updatePoint3d (aCriterion, aPickResult, theEntity, theInversedTrsf, theMgr);
mystored.Add (anOwner, aCriterion);
Standard_Boolean anExists = Standard_False;
for (Standard_Integer aStoredIter = 1; aStoredIter <= mystored.Extent(); ++aStoredIter)
{
const SelectMgr_SortCriterion& aSearchCriterion = mystored.FindFromIndex (aStoredIter);
const Handle(SelectMgr_EntityOwner)& aSearchOwner = aSearchCriterion.Entity->OwnerId();
Handle(SelectMgr_SelectableObject) aSearchSelectable = !aSearchOwner.IsNull() ? aSearchOwner->Selectable() : Handle(SelectMgr_SelectableObject)();
if (!aSearchSelectable.IsNull() && !aSelectable.IsNull())
{
if (aSearchSelectable == aSelectable)
{
anExists = Standard_True;
}
}
}
if(!anExists)
{
mystored.Add (anOwner, aCriterion);
}
}
}