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
This commit is contained in:
Tranter Madi 2020-03-25 09:23:30 -06:00 committed by Nate Graham
parent 2bb54ffc6c
commit b96c48b44e

View file

@ -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;
}