Commit ddfc86ab authored by Andreas Krutzler's avatar Andreas Krutzler
Browse files

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
parent 3f682ad3
......@@ -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();
......
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