]> OCCT Git - occt-copy.git/commitdiff
0030725: Visualization - remove Display calling from SetSelected methods of context
authornds <nds@opencascade.com>
Thu, 6 Jun 2019 13:40:52 +0000 (16:40 +0300)
committernds <nds@opencascade.com>
Tue, 11 Jun 2019 10:50:37 +0000 (13:50 +0300)
AIS_InteractiveContext::Load/ClearGlobal is modified for correct processing SetSelected for child objects.
As Display/Erase of object with children displays/erases these children, then the children status inside context should also be updated.

(cherry picked from commit 26b44c42ba1c2d999edf10d8dab4c02eae2c5ff7)

# Conflicts:
# src/AIS/AIS_InteractiveContext.hxx

src/AIS/AIS_InteractiveContext.hxx
src/AIS/AIS_InteractiveContext_1.cxx

index b136388c851133d6e2afd43739984966e4cfbe9d..7ecf896843dad0348952cf27165c80f33e34f6d8 100644 (file)
@@ -1397,9 +1397,9 @@ protected: //! @name internal methods
     }
   }
 
-  //! Bind/Unbind status to object and object children
-  //! \param theIObj object
-  //! \param theStatus status, if NULL, unbind object
+  //! Bind/Unbind status to object and its children
+  //! @param theObj [in] the object to change status
+  //! @param theStatus status, if NULL, unbind object
   Standard_EXPORT void setObjectStatus (const Handle(AIS_InteractiveObject)& theIObj,
                                         const AIS_DisplayStatus theStatus,
                                         const Standard_Integer theDispyMode,
index 19dce11974b5c7383c4498f8362f29a01cd57d6d..1901b14f217fde0ddea4733366b586246005e1dc 100644 (file)
@@ -732,7 +732,7 @@ void AIS_InteractiveContext::SetSelected (const Handle(AIS_InteractiveObject)& t
 
   if (!myObjects.IsBound (theObject))
   {
-    Display (theObject, Standard_False);
+    return;
   }
 
   Handle(SelectMgr_EntityOwner) anOwner = theObject->GlobalSelOwner();
@@ -824,7 +824,7 @@ void AIS_InteractiveContext::SetSelected (const Handle(SelectMgr_EntityOwner)& t
   }
 
   if (!myObjects.IsBound (anObject))
-    Display (anObject, Standard_False);
+    return;
 
   if (myAutoHilight)
   {