Commit 88d9e8f2 authored by Nate Graham's avatar Nate Graham 🔩

[kcms/translations] Don't show inline buttonsfor last list item

Removing the only item makes no conceptual sense, so let's not permit
it. Likewise, when there's only one item, it can't be moved to the top
since it's already at the top, so let's not show that one either.

BUG: 397978
FIXED-IN: 5.21
parent 8996d9e0
......@@ -225,13 +225,15 @@ ScrollViewKCM {
actions: [
Kirigami.Action {
enabled: !model.IsMissing && index > 0
visible: languagesList.count > 1
iconName: "go-top"
tooltip: i18nc("@info:tooltip", "Promote to default")
onTriggered: kcm.selectedTranslationsModel.move(index, 0)
},
Kirigami.Action {
property bool removing: false
enabled: removing || !model.IsMissing && languagesList.count > 1
enabled: removing || !model.IsMissing
visible: languagesList.count > 1
iconName: "list-remove"
tooltip: i18nc("@info:tooltip", "Remove")
onTriggered: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment