]> cloud.milkyroute.net Git - dolphin.git/commitdiff
dolphinview: after inline renaming, immediately update the selection
authorJin Liu <m.liu.jin@gmail.com>
Fri, 11 Oct 2024 08:17:04 +0000 (16:17 +0800)
committerJin Liu <m.liu.jin@gmail.com>
Sat, 12 Oct 2024 13:17:38 +0000 (21:17 +0800)
Currently, the inline renaming updates the model and
the list of selected files (m_selectedUrls) immediately
after the user presses enter, but the selection in the
view is not immediately updated. This results in the
selection to be briefly lost for about 1 second until
the view automatically refreshes.

This patch updates the selection immediately after
the user presses enter, so the renamed file is still
selected.

BUG: 481717

src/views/dolphinview.cpp

index 17023ae5f445d7d8e556ffaf8d4f0d25684b9553..ab39173dacbed1c29fb8adb35e99418ea12e1aad 100644 (file)
@@ -2032,6 +2032,7 @@ void DolphinView::slotRoleEditingFinished(int index, const QByteArray &role, con
 
             if (!newNameExistsAlready) {
                 forceUrlsSelection(newUrl, {newUrl});
+                updateSelectionState();
 
                 // Only connect the result signal if there is no item with the new name
                 // in the model yet, see bug 328262.