[utilities/kdebugsettings] src/quickapps/contents/ui: Verify that we have elements

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 8ad45134650ce26ebd63b7bb284390edf805a144 by Laurent Montel.
Committed on 17/07/2026 at 05:46.
Pushed by mlaurent into branch 'master'.

Verify that we have elements

M  +1    -1    src/quickapps/contents/ui/CustomRulesPage.qml

https://invent.kde.org/utilities/kdebugsettings/-/commit/8ad45134650ce26ebd63b7bb284390edf805a144

diff --git a/src/quickapps/contents/ui/CustomRulesPage.qml b/src/quickapps/contents/ui/CustomRulesPage.qml
index cab2fd89..b8af0b86 100644
--- a/src/quickapps/contents/ui/CustomRulesPage.qml
+++ b/src/quickapps/contents/ui/CustomRulesPage.qml
@@ -35,7 +35,7 @@ Kirigami.ScrollablePage {
 
         QQC2.Menu {
             id: contextMenu
-            enabled: listviewRules.currentIndex !== -1
+            enabled: listviewRules.currentIndex !== -1 && listviewRules.count !== 0
             QQC2.MenuItem {
                 icon.name: "list-add"
                 text: i18nc("@action add custom rule", "Add Rule…")
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.