diff options
author | Błażej Szczygieł <spaz16@wp.pl> | 2016-05-24 16:30:02 +0200 |
---|---|---|
committer | Błażej Szczygieł <spaz16@wp.pl> | 2016-05-30 07:52:11 +0000 |
commit | 1d9d16515853932205d4ca82a385dfb9c2221394 (patch) | |
tree | 13aad15a99f8ebbefeddd2356a200dc8f318f7e1 /src | |
parent | b403b8c094a1bf59b70368e28cbd454b6872498f (diff) |
QAbstractItemView: Reset the drop indicator
Always reset the drop indicator position and rect when drag action will
be finished. This can prevent drawing the indicator in bad place when
the next drag will be performed.
Task-number: QTBUG-53541
Change-Id: I420207a0ede6f19f48472a8f0f723afe948de1c6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 9dbe5c6c54..057718cdba 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -3620,6 +3620,9 @@ void QAbstractItemView::startDrag(Qt::DropActions supportedActions) defaultDropAction = Qt::CopyAction; if (drag->exec(supportedActions, defaultDropAction) == Qt::MoveAction) d->clearOrRemove(); + // Reset the drop indicator + d->dropIndicatorRect = QRect(); + d->dropIndicatorPosition = OnItem; } } #endif // QT_NO_DRAGANDDROP |