From 91e3f56d8a50b012eb1a33c19af32236e9a8c369 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 22 May 2019 14:24:12 +0300 Subject: [PATCH] 0030726: Visualization - change Selected state of owner in AIS_Selection # IsHilighted by owner should use the same logic like when it is highlighted. IsSelected is used for selection state, not highlight. # # Without this correction, object is never shown as selected by click (Select(bool)): # if (!HighlightStyle (theOwner, aCustomStyle) || # (!aCustomStyle.IsNull() && aCustomStyle != anObjSelStyle)) # IsSelected is already true, so the highlight style is equal to selection style, nothing to do. (cherry picked from commit 7d778441498ef0f0f545c800c671ee693bb5cf05) --- src/AIS/AIS_InteractiveContext.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index 5c8aa1368c..572979090b 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -756,7 +756,9 @@ Standard_Boolean AIS_InteractiveContext::IsHilighted (const Handle(SelectMgr_Ent return myObjects (anObj)->IsHilighted(); } - return theOwner->IsSelected(); + const Handle(Prs3d_Drawer)& aStyle = getSelStyle (anObj, theOwner); + const Standard_Integer aHiMode = getHilightMode (anObj, aStyle, -1); + return theOwner->IsHilighted (myMainPM, aHiMode); } //======================================================================= -- 2.39.5