From: nds Date: Thu, 6 Jun 2019 13:40:52 +0000 (+0300) Subject: 0030725: Visualization - remove Display calling from SetSelected methods of context X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=b65ce1439cc3d771c4656e13ae74c0fd0f01dc2a;p=occt-copy.git 0030725: Visualization - remove Display calling from SetSelected methods of context 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 --- diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index b136388c85..7ecf896843 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -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, diff --git a/src/AIS/AIS_InteractiveContext_1.cxx b/src/AIS/AIS_InteractiveContext_1.cxx index 19dce11974..1901b14f21 100644 --- a/src/AIS/AIS_InteractiveContext_1.cxx +++ b/src/AIS/AIS_InteractiveContext_1.cxx @@ -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) {