mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
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
This commit is contained in:
parent
3f682ad3a7
commit
ddfc86ab8c
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue