Skip to content

Commit

Permalink
fix option initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Jun 10, 2024
1 parent 34faa28 commit 909b6b9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/ayon_core/tools/utils/delegates.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,13 @@ def paint(self, painter, option, index):
)

if option.state & QtWidgets.QStyle.State_HasFocus:
focus_opt = QtWidgets.QStyleOptionFocusRect(option)
focus_opt = QtWidgets.QStyleOptionFocusRect()
focus_opt.state = option.state
focus_opt.direction = option.direction
focus_opt.rect = option.rect
focus_opt.fontMetrics = option.fontMetrics
focus_opt.palette = option.palette

focus_opt.rect = style.subElementRect(
QtWidgets.QCommonStyle.SE_ItemViewItemFocusRect,
option,
Expand Down

0 comments on commit 909b6b9

Please sign in to comment.