Commit d8322161 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[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.
parent b81d3fbb
Pipeline #127728 passed with stage
in 3 minutes and 8 seconds
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment