]> 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>
Fri, 4 Oct 2019 15:49:37 +0000 (18:49 +0300)
# todo - add similar check for other places where needed

(cherry picked from commit 9e58a207356c928cc53741a35830be150e2b3d8f)
(cherry picked from commit 3ca159f3cab5917e46ee05d30a120c80bc41f20f)

src/AIS/AIS_InteractiveContext_1.cxx

index 70ba165da4b8f4d115508fc602665945b9d1a42b..25cdd32e737176cc934e49d7a7e02263cbd46a06 100644 (file)
@@ -990,7 +990,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);