1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0030726: Visualization - change Selected state of owner in AIS_Selection

AIS_InteractiveContext::IsHilighted() behavior has been changed.
It should use the same logic for owner processing like when it is highlighted. IsSelected of owner 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.
This commit is contained in:
nds
2019-06-06 11:50:21 +03:00
committed by bugmaster
parent fc552d842e
commit 8d2c79f4e3
3 changed files with 14 additions and 23 deletions

View File

@@ -754,7 +754,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);
}
//=======================================================================