mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
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:
parent
2bb54ffc6c
commit
b96c48b44e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue