{
const Handle(SelectMgr_EntityOwner) anOwner = aSelIter.Value();
const Handle(AIS_InteractiveObject) anInteractive = Handle(AIS_InteractiveObject)::DownCast (anOwner->Selectable());
- Handle(AIS_GlobalStatus) aStatus;
- if (!myObjects.Find (anInteractive, aStatus))
+ Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (anInteractive);
+ if (!aStatusPtr)
{
continue;
}
anOwner->Unhilight (myMainPM);
if (theIsToHilightSubIntensity)
{
- if (aStatus->IsSubIntensityOn())
+ if ((*aStatusPtr)->IsSubIntensityOn())
{
- const Standard_Integer aHiMode = getHilightMode (anInteractive, aStatus->HilightStyle(), aStatus->DisplayMode());
+ const Standard_Integer aHiMode = getHilightMode (anInteractive, (*aStatusPtr)->HilightStyle(), (*aStatusPtr)->DisplayMode());
highlightWithSubintensity (anOwner, aHiMode);
}
}
}
if (anOwner == anInteractive->GlobalSelOwner())
{
- aStatus->SetHilightStatus (Standard_False);
+ (*aStatusPtr)->SetHilightStatus (Standard_False);
}
}
for (NCollection_IndexedMap<Handle(AIS_InteractiveObject)>::Iterator anIter (anObjToClear); anIter.More(); anIter.Next())
continue;
const Handle(Prs3d_Drawer)& anObjSelStyle = getSelStyle (anObj, anOwner);
- Handle(AIS_GlobalStatus)& aState = myObjects.ChangeFind(anObj);
+ Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (anObj);
+ if (!aStatusPtr)
+ {
+ continue;
+ }
if (anOwner == anObj->GlobalSelOwner())
{
- aState->SetHilightStatus (Standard_True);
- aState->SetHilightStyle (anObjSelStyle);
+ (*aStatusPtr)->SetHilightStatus (Standard_True);
+ (*aStatusPtr)->SetHilightStyle (anObjSelStyle);
}
if (!anOwner->IsAutoHilight())
{
}
else
{
- const Standard_Integer aHiMode = getHilightMode (anObj, anObjSelStyle, aState->DisplayMode());
+ const Standard_Integer aHiMode = getHilightMode (anObj, anObjSelStyle, (*aStatusPtr)->DisplayMode());
anOwner->HilightWithColor (myMainPM, anObjSelStyle, aHiMode);
}
}
}
if (aSelOwner == aSelectable->GlobalSelOwner())
{
- myObjects.ChangeFind (aSelectable)->SetHilightStatus (Standard_False);
+ if (Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (aSelectable))
+ {
+ (*aStatusPtr)->SetHilightStatus (Standard_False);
+ }
}
}
if (myAutoHilight)
{
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
- Handle(AIS_GlobalStatus)& aStatus = myObjects.ChangeFind (anObj);
+ Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (anObj);
+ if (!aStatusPtr)
+ {
+ return;
+ }
+
if (theOwner->IsSelected())
{
highlightSelected (theOwner);
anOwners.Append (theOwner);
unhighlightOwners (anOwners);
- aStatus->SetHilightStyle (Handle(Prs3d_Drawer)());
+ (*aStatusPtr)->SetHilightStyle (Handle(Prs3d_Drawer)());
}
}