]> cloud.milkyroute.net Git - dolphin.git/commitdiff
DolphinView: If contextmenu is requested, abort twoClicksRenaming
authorAkseli Lahtinen <akselmo@akselmo.dev>
Wed, 23 Apr 2025 12:39:36 +0000 (15:39 +0300)
committerAkseli Lahtinen <akselmo@akselmo.dev>
Wed, 23 Apr 2025 12:39:36 +0000 (15:39 +0300)
When using single click to select, user can double click the file to
start renaming it. If user at the same time also opens context menu,
user can delete the file while the renaming prompt is open, which causes
weirdness.

This patch makes sure we abort the double click renaming when context
menu is requested.

BUG: 503185

src/views/dolphinview.cpp

index d5908a0814801c493af44eb4f44f56b8326046b1..f3bde88df294c86499857be89d7d7706cb3e96e5 100644 (file)
@@ -1174,6 +1174,9 @@ void DolphinView::slotItemContextMenuRequested(int index, const QPointF &pos)
     if (m_selectionChangedTimer->isActive()) {
         emitSelectionChangedSignal();
     }
+    if (m_twoClicksRenamingTimer->isActive()) {
+        abortTwoClicksRenaming();
+    }
 
     const KFileItem item = m_model->fileItem(index);
     Q_EMIT requestContextMenu(pos.toPoint(), item, selectedItems(), url());