]> 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, 2 Sep 2019 13:57:09 +0000 (16:57 +0300)
# todo - add similar check for other places where needed

(cherry picked from commit 9e58a207356c928cc53741a35830be150e2b3d8f)

src/AIS/AIS_InteractiveContext_1.cxx

index 9dd2c9e3c76932d511f71ddacd35a8301de05bc8..c9acfacd856db4b4e76e54a73559d1cea8d61721 100644 (file)
@@ -954,7 +954,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);