dolphin/Fix-that-dragging-a-file-can-trigger-inline-rename.patch
Luca Beltrame 3e39cfc384 Accepting request 639822 from home:wolfi323:branches:KDE:Applications
- Add Fix-that-dragging-a-file-can-trigger-inline-rename.patch to
  prevent accidentally triggering inline rename by just dragging a
  file (boo#1108797, kde#398375)

OBS-URL: https://build.opensuse.org/request/show/639822
OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/dolphin?expand=0&rev=147
2018-10-03 21:37:09 +00:00

57 lines
2.1 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From ddfc86ab8c207b81ec9ac83167d081b8d01c2750 Mon Sep 17 00:00:00 2001
From: Andreas Krutzler <andreas.krutzler@gmx.net>
Date: Tue, 2 Oct 2018 20:25:57 +0200
Subject: Fix that dragging a file can trigger inline rename.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Summary:
Inline renaming is aborted as soon as an item is dragged. Previously, m_dragging' was used to determine if an item was being dragged. However, inline renaming is triggered after a certain amount of
time, during which time the user may have stopped dragging items.
BUG: 398375
FIXED-IN: 18.08.2
Test Plan: When dragging an selected item, inline renaming should never be started, regardless of where you drag it (Places panel, other split-view window, out of the Dolphin window, ...).
Reviewers: wbauer, elvisangelaccio, #dolphin, ngraham
Reviewed By: wbauer, elvisangelaccio, #dolphin, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D15904
---
src/views/dolphinview.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 342c226..1db62b8 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -755,6 +755,7 @@ bool DolphinView::eventFilter(QObject* watched, QEvent* event)
case QEvent::GraphicsSceneDragEnter:
if (watched == m_view) {
m_dragging = true;
+ abortTwoClicksRenaming();
}
break;
@@ -1432,8 +1433,8 @@ void DolphinView::slotTwoClicksRenamingTimerTimeout()
{
const KItemListSelectionManager* selectionManager = m_container->controller()->selectionManager();
- // verify that only one item is selected and that no item is dragged
- if (selectionManager->selectedItems().count() == 1 && !m_dragging) {
+ // verify that only one item is selected
+ if (selectionManager->selectedItems().count() == 1) {
const int index = selectionManager->currentItem();
const QUrl fileItemUrl = m_model->fileItem(index).url();
--
cgit v0.11.2