1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-01 17:36:21 +03:00

Visualization - NCollection_DataMap::Find() exception from AIS_Selection::Select() #375

Problem with NCollection_DataMap::Find() exception during multiple selection in OCC viewer.
Incorrect call is made from AIS_Selection::Select() method at line:
AIS_NListOfEntityOwner::Iterator aListIter = myResultMap.Find (theOwner);
Original issue: 0033742
This commit is contained in:
Zernova Marina 2025-02-17 15:52:24 +00:00 committed by GitHub
parent e375bd7c3e
commit 8fb662b0aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,8 +65,11 @@ AIS_SelectStatus AIS_Selection::Select(const Handle(SelectMgr_EntityOwner)& theO
const Standard_Boolean wasSelected = theOwner->IsSelected();
const Standard_Boolean toSelect = theOwner->Select(theSelScheme, isDetected);
if (toSelect && !wasSelected)
if (!wasSelected || !myResultMap.IsBound(theOwner))
{
if (!toSelect)
return AIS_SS_NotDone;
AIS_NListOfEntityOwner::Iterator aListIter;
myresult.Append(theOwner, aListIter);
myResultMap.Bind(theOwner, aListIter);
@ -74,11 +77,6 @@ AIS_SelectStatus AIS_Selection::Select(const Handle(SelectMgr_EntityOwner)& theO
return AIS_SS_Added;
}
if (!toSelect && !wasSelected)
{
return AIS_SS_NotDone;
}
AIS_NListOfEntityOwner::Iterator aListIter = myResultMap.Find(theOwner);
if (myIterator == aListIter)
{