┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2022-01-20 12:38:47 +0100
committerKai Uwe Broulik <[email protected]>2022-01-23 18:49:24 +0000
commitd8322161594cfa967ae80ea7b37f2e04393b0f1a (patch)
treec242453d42da1b8b52b281aa2ba1fa0f4326119a
parentb81d3fbbbb188805e279791f4e06dec460f83697 (diff)
[Tab Bar] Accept proposed action only ontop of a tab
You cannot drop a file/folder onto the empty area of the tab bar, so show the appropriate "not allowed" cursor.
-rw-r--r--src/dolphintabbar.cpp13
1 files changed, 12 insertions, 1 deletions
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);
}