From eb201a57dbeff93d788546e61b193dcf4f4258b9 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 13 Jul 2020 12:36:41 +0200 Subject: Compare the showDecorationSelected variable when caching the option Since the size of the display rect can change if showDecorationSelected is set then this should be included when seeing if the item is already cached. Change-Id: Ied6182337de5894d879c5ba5d1125b4869a11cc9 Pick-to: 5.15 Fixes: QTBUG-85451 Reviewed-by: Friedemann Kleint Reviewed-by: Volker Hilsheimer --- src/widgets/styles/qcommonstyle_p.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/styles/qcommonstyle_p.h b/src/widgets/styles/qcommonstyle_p.h index 6223a26a54..5513463104 100644 --- a/src/widgets/styles/qcommonstyle_p.h +++ b/src/widgets/styles/qcommonstyle_p.h @@ -112,7 +112,8 @@ public: && option.features == cachedOption->features && option.icon.isNull() == cachedOption->icon.isNull() && option.font == cachedOption->font - && option.viewItemPosition == cachedOption->viewItemPosition); + && option.viewItemPosition == cachedOption->viewItemPosition + && option.showDecorationSelected == cachedOption->showDecorationSelected); } #endif #if QT_CONFIG(toolbutton) -- cgit v1.2.3