diff options
author | David Faure <[email protected]> | 2024-09-30 21:58:51 +0200 |
---|---|---|
committer | David Faure <[email protected]> | 2024-10-01 16:04:54 +0200 |
commit | 39e7016e8a0cc749d9be83e88ef94b3df40d7cc1 (patch) | |
tree | aa8e32b26cf53028e884df2febcbaf310708275c | |
parent | 834760e85eac93a959d5e9856b5565afaf421ea7 (diff) |
QAIV drop indicator: don't draw a single pixel when the rect is null
Drive-by change: fix a trivial typo
Also, clang-format changed some indentation
Fixes: QTBUG-36831
Pick-to: 6.8
Change-Id: Icb259cc8a1fc83aca3d4cd581fa0e88e7907602b
Reviewed-by: Axel Spoerl <[email protected]>
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 2 | ||||
-rw-r--r-- | src/widgets/itemviews/qabstractitemview_p.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 9d27f1db172..7601eae68ff 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -3424,7 +3424,7 @@ void QAbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelInde } } if (isVisible() && !d->delayedPendingLayout) { - // otherwise the items will be update later anyway + // otherwise the items will be updated later anyway update(topLeft); } } else { diff --git a/src/widgets/itemviews/qabstractitemview_p.h b/src/widgets/itemviews/qabstractitemview_p.h index 5a6d7957c76..292ba095098 100644 --- a/src/widgets/itemviews/qabstractitemview_p.h +++ b/src/widgets/itemviews/qabstractitemview_p.h @@ -164,10 +164,11 @@ public: inline void paintDropIndicator(QPainter *painter) { if (showDropIndicator && state == QAbstractItemView::DraggingState + && !dropIndicatorRect.isNull() #ifndef QT_NO_CURSOR && viewport->cursor().shape() != Qt::ForbiddenCursor #endif - ) { + ) { QStyleOption opt; opt.initFrom(q_func()); opt.rect = dropIndicatorRect; |