summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBłażej Szczygieł <spaz16@wp.pl>2016-05-24 16:30:02 +0200
committerBłażej Szczygieł <spaz16@wp.pl>2016-05-30 07:52:11 +0000
commit1d9d16515853932205d4ca82a385dfb9c2221394 (patch)
tree13aad15a99f8ebbefeddd2356a200dc8f318f7e1
parentb403b8c094a1bf59b70368e28cbd454b6872498f (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>
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp3
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