[utilities/keepsecret] src/qml: Fix right-click opening entry panel

Roshani Kumari <[email protected]> Tue, 4 Aug 2026 13:48:02 +0000 (UTC)
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 79b5b169a2fb8b81ef5eae2780035ba8dd007bdc by Roshani Kumari.
Committed on 04/08/2026 at 13:39.
Pushed by roshani into branch 'master'.

Fix right-click opening entry panel

M  +4    -5    src/qml/CollectionContentsPage.qml

https://invent.kde.org/utilities/keepsecret/-/commit/79b5b169a2fb8b81ef5eae2780035ba8dd007bdc

diff --git a/src/qml/CollectionContentsPage.qml b/src/qml/CollectionContentsPage.qml
index 2fe9800..95df111 100644
--- a/src/qml/CollectionContentsPage.qml
+++ b/src/qml/CollectionContentsPage.qml
@@ -283,14 +283,14 @@ Kirigami.ScrollablePage {
             "dbusPath": "",
             "folder": ""
         }
-        onOpened: {
-            App.secretItemForContextMenu.loadItem(App.collectionModel.collectionPath, contextMenu.model.dbusPath);
-        }
         QQC.MenuItem {
             text: i18nc("@action:inmenu Copy this secret", "Copy Secret")
             icon.name: "edit-copy-symbolic"
             enabled: App.secretItemForContextMenu.status !== SecretItemProxy.Locked
-            onClicked: App.secretItemForContextMenu.copySecret()
+            onClicked: {
+                App.secretItemForContextMenu.loadItem(App.collectionModel.collectionPath, contextMenu.model.dbusPath)
+                App.secretItemForContextMenu.copySecret()
+            }
         }
         QQC.MenuItem {
             text: page.selectedCount > 1
@@ -413,7 +413,6 @@ Kirigami.ScrollablePage {
                                 page.selectedIndices = [index]
                                 page.selectedCount = 1
                                 page.lastSelectedIndex = index
-                                view.currentIndex = index
                                 App.secretItem.close()
                             }
                         } else {