From: Akseli Lahtinen Date: Wed, 23 Apr 2025 12:39:36 +0000 (+0300) Subject: DolphinView: If contextmenu is requested, abort twoClicksRenaming X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/0f75aa69ea5cd448553d80fc20b172ee5eb28092?ds=sidebyside DolphinView: If contextmenu is requested, abort twoClicksRenaming 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 --- diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index d5908a081..f3bde88df 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -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());