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
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);
return AIS_SS_Added;
}
- if (!toSelect && !wasSelected)
- {
- return AIS_SS_NotDone;
- }
-
AIS_NListOfEntityOwner::Iterator aListIter = myResultMap.Find(theOwner);
if (myIterator == aListIter)
{