summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Hein <[email protected]>2018-05-25 05:18:58 +0900
committerEike Hein <[email protected]>2018-05-25 05:22:01 +0900
commit38c66b90efcc339194a602dd7039566abaf8944f (patch)
tree27f193bdb59e7fe2693516c1bbc4568d68fc328c
parent1697e8cd2d994cc2bd2960207f8bd562fac5d22c (diff)
Fix adding langs more than once within the same session.
Summary: BUG:394455 Reviewers: davidedmundson Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D13101
-rw-r--r--package/contents/ui/main.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml
index 8021566..c8c0747 100644
--- a/package/contents/ui/main.qml
+++ b/package/contents/ui/main.qml
@@ -103,12 +103,12 @@ ScrollViewKCM {
enabled: false
onClicked: {
- var langs = [];
+ var langs = kcm.translationsModel.selectedLanguages.slice();
addLanguagesSheet.selectedLanguages.sort().forEach(function(index) {
langs.push(availableLanguagesModel.get(index).LanguageCode);
});
- kcm.translationsModel.selectedLanguages = kcm.translationsModel.selectedLanguages.concat(langs);
+ kcm.translationsModel.selectedLanguages = langs;
addLanguagesSheet.sheetOpen = false;
}