diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2009-03-30 14:50:29 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2009-03-30 15:01:10 (GMT) |
commit | 42fd9d5b21e41bdc1fc0ffb788fe96018c311d64 (patch) | |
tree | 5d52d6eb50dd8d0dbc073f3078e8fe467a23fd15 /src/gui/styles | |
parent | f9c434cd70663db2d1b1c32c8b68ae3ff85d6803 (diff) | |
download | Qt-42fd9d5b21e41bdc1fc0ffb788fe96018c311d64.zip Qt-42fd9d5b21e41bdc1fc0ffb788fe96018c311d64.tar.gz Qt-42fd9d5b21e41bdc1fc0ffb788fe96018c311d64.tar.bz2 |
Fix incorrect painting of checked itemview items
We should check the item features instead of looking for a valid rect
as a subclass trying to override the default checkrect size might not
perform this check.
Task-number: 232633
Reviewed-by: nrc
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qcommonstyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 86a3ce0..d5ce8df 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -2268,7 +2268,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, drawPrimitive(PE_PanelItemViewItem, opt, p, widget); // draw the check mark - if (checkRect.isValid()) { + if (vopt->features & QStyleOptionViewItemV2::HasCheckIndicator) { QStyleOptionViewItemV4 option(*vopt); option.rect = checkRect; option.state = option.state & ~QStyle::State_HasFocus; |