diff options
| author | Andreas Krutzler <[email protected]> | 2018-10-02 20:25:57 +0200 |
|---|---|---|
| committer | Andreas Krutzler <[email protected]> | 2018-10-03 20:08:09 +0200 |
| commit | ddfc86ab8c207b81ec9ac83167d081b8d01c2750 (patch) | |
| tree | b3fae9425136c1e0bedf856b33b12a35b8c80de3 /src/views/dolphinview.cpp | |
| parent | 3f682ad3a7f914bf2455083b521e20bbb8cebbf2 (diff) | |
Fix that dragging a file can trigger inline rename.
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
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 342c22638..1db62b800 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(); |
