[utilities/kdebugsettings] src/quickapps/contents/ui: Don't show menu when we don't have items

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

Don't show menu when we don't have items

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

https://invent.kde.org/utilities/kdebugsettings/-/commit/cede4381e5c21f210de17287fb491ef08571807a

diff --git a/src/quickapps/contents/ui/CustomRulesPage.qml b/src/quickapps/contents/ui/CustomRulesPage.qml
index b8af0b86..7871ef1d 100644
--- a/src/quickapps/contents/ui/CustomRulesPage.qml
+++ b/src/quickapps/contents/ui/CustomRulesPage.qml
@@ -28,6 +28,7 @@ Kirigami.ScrollablePage {
             onClicked: listviewRules.currentIndex = index
 
             TapHandler {
+                enabled: listviewRules.currentIndex !== -1 && listviewRules.count !== 0
                 acceptedButtons: Qt.RightButton
                 onTapped: contextMenu.popup()
             }
@@ -35,7 +36,6 @@ Kirigami.ScrollablePage {
 
         QQC2.Menu {
             id: contextMenu
-            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.