Commit b96c48b4 authored by Tranter Madi's avatar Tranter Madi 🌧 Committed by Nate Graham
Browse files

Update dragCursor while dragging

Summary:
While dragging, the user could want to change the modifier, so we should call event->acceptProposedAction() to do update the dragCursor.

FIXED-IN: 20.04.0

Test Plan: While dragging files, change modifiers between Ctrl/Shift/Alt... and move the mouse at least 1px to see the cursor changes.

Reviewers: #dolphin, meven, ngraham, davidedmundson, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D28017
parent 2bb54ffc
......@@ -929,8 +929,13 @@ bool KItemListController::dragMoveEvent(QGraphicsSceneDragDropEvent* event, cons
m_view->hideDropIndicator();
}
event->setAccepted(!DragAndDropHelper::urlListMatchesUrl(event->mimeData()->urls(), hoveredDir));
if (DragAndDropHelper::urlListMatchesUrl(event->mimeData()->urls(), hoveredDir)) {
event->setDropAction(Qt::IgnoreAction);
event->ignore();
} else {
event->setDropAction(event->proposedAction());
event->accept();
}
return false;
}
......
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