X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/97415729c34851df75c77a67f27d6299c00bfbc4..f645e6b4b2053926bcea3f9ae6985a53b28caab1:/src/dolphintabbar.cpp diff --git a/src/dolphintabbar.cpp b/src/dolphintabbar.cpp index 67a61b031..4c1d9e44a 100644 --- a/src/dolphintabbar.cpp +++ b/src/dolphintabbar.cpp @@ -36,7 +36,13 @@ void DolphinTabBar::dragEnterEvent(QDragEnterEvent* event) const int index = tabAt(event->pos()); if (mimeData->hasUrls()) { - event->acceptProposedAction(); + if (index >= 0) { + event->acceptProposedAction(); + } else { + event->setDropAction(Qt::IgnoreAction); + // Still need to accept it to receive dragMoveEvent + event->accept(); + } updateAutoActivationTimer(index); } @@ -56,6 +62,11 @@ void DolphinTabBar::dragMoveEvent(QDragMoveEvent* event) const int index = tabAt(event->pos()); if (mimeData->hasUrls()) { + if (index >= 0) { + event->acceptProposedAction(); + } else { + event->setDropAction(Qt::IgnoreAction); + } updateAutoActivationTimer(index); }