From b31ef46576744b410d36956803e160d16c92fc34 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Sun, 23 May 2021 21:21:55 +0200 Subject: [PATCH] [kcms/virtualdesktop] Don't offer to remove the last desktop The current UI allows to remove the last desktop, but: - If you remove it it will reappear on the next KCM launch - The Add button does not work then Prevent removing the last desktop by disabling the action BUG: 437561 --- src/kcmkwin/kwindesktop/package/contents/ui/main.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kcmkwin/kwindesktop/package/contents/ui/main.qml b/src/kcmkwin/kwindesktop/package/contents/ui/main.qml index e531d5730e..c58d3b99fc 100644 --- a/src/kcmkwin/kwindesktop/package/contents/ui/main.qml +++ b/src/kcmkwin/kwindesktop/package/contents/ui/main.qml @@ -85,7 +85,7 @@ KCM.ScrollViewKCM { } }, Kirigami.Action { - enabled: model && !model.IsMissing + enabled: model && !model.IsMissing && desktopsList.count !== 1 iconName: "edit-delete-remove" tooltip: i18nc("@info:tooltip", "Remove") onTriggered: kcm.desktopsModel.removeDesktop(model.Id)