]> OCCT Git - occt-copy.git/commitdiff
0030784: Visualization - check if selectable of owner in internal container in AIS_In...
authornds <nds@opencascade.com>
Tue, 14 May 2019 11:31:43 +0000 (14:31 +0300)
committernds <nds@opencascade.com>
Mon, 17 Jun 2019 10:12:38 +0000 (13:12 +0300)
# todo - add similar check for other places where needed

src/AIS/AIS_InteractiveContext_1.cxx

index fe5cebd0805deb377eef80660e918321d2e6399e..98fef4ec6c68ae9c8692d151dea21b5a7427642d 100644 (file)
@@ -888,7 +888,9 @@ void AIS_InteractiveContext::AddOrRemoveSelected (const Handle(SelectMgr_EntityO
   if (myAutoHilight)
   {
     const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
-    Handle(AIS_GlobalStatus)& aStatus = myObjects.ChangeFind (anObj);
+    if (!myObjects.IsBound(anObj)) // e.g. AIS_ViewCubeFlat is not displayed
+      return;
+   Handle(AIS_GlobalStatus)& aStatus = myObjects.ChangeFind (anObj);
     if (theOwner->IsSelected())
     {
       highlightSelected (theOwner);