]> OCCT Git - occt-copy.git/commitdiff
0030728: Visualization - using one implementation of highlight/unhighlight in context...
authornds <nds@opencascade.com>
Mon, 17 Jun 2019 10:45:49 +0000 (13:45 +0300)
committernds <nds@opencascade.com>
Mon, 17 Jun 2019 10:45:49 +0000 (13:45 +0300)
# check of NULL global selection owner (e.g. AIS_RubberBand has no global owner)

src/AIS/AIS_InteractiveContext.cxx

index 4adacccee4ff57d4741b5f1c83797e7e3726d694..2cee8d8642d5ab16e0e5857d7c078f66b07ede6c 100644 (file)
@@ -1945,7 +1945,9 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& t
 
   const Standard_Integer aDispMode = theIObj->HasHilightMode() ? theIObj->HilightMode() : 0;
   AIS_NListOfEntityOwner anOwners;
-  anOwners.Append(theIObj->GlobalSelOwner());
+  const Handle(SelectMgr_EntityOwner)& aGlobOwner = theIObj->GlobalSelOwner();
+  if (!aGlobOwner.IsNull())
+    anOwners.Append(aGlobOwner);
   unhighlightOwners (anOwners);
   myMainPM->SetVisibility (theIObj, aStatus->DisplayMode(), Standard_False);