From 012b5dc8a03ae41ae68e54bc802d60c8a16a6ec1 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 25 Mar 2021 15:01:59 -0400 Subject: [PATCH] fix: fix language list view scrollbar and binding loop --- .../Profile/Sections/LanguageModal.qml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/ui/app/AppLayouts/Profile/Sections/LanguageModal.qml b/ui/app/AppLayouts/Profile/Sections/LanguageModal.qml index 6b825ac6e9..dbc5fce6e1 100644 --- a/ui/app/AppLayouts/Profile/Sections/LanguageModal.qml +++ b/ui/app/AppLayouts/Profile/Sections/LanguageModal.qml @@ -18,39 +18,37 @@ ModalPopup { Item { anchors.fill: parent + ButtonGroup { + id: languageGroup + } + ScrollView { width: parent.width anchors.top: parent.top anchors.topMargin: Style.current.padding anchors.bottom: parent.bottom anchors.bottomMargin: Style.current.bigPadding - anchors.left: parent.left - anchors.leftMargin: 16 - anchors.right: parent.right - anchors.rightMargin: 16 ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.vertical.policy: ScrollBar.AlwaysOn clip: true - ButtonGroup { - id: languageGroup - } - ListView { id: languagesListView anchors.fill: parent anchors.rightMargin: Style.current.padding + anchors.leftMargin: Style.current.padding model: Locales_JSON.locales spacing: 0 delegate: Component { StatusRadioButtonRow { height: 64 + anchors.rightMargin: 0 text: modelData.name buttonGroup: languageGroup checked: appSettings.locale === modelData.locale onRadioCheckedChanged: { - if (checked) { + if (checked && appSettings.locale !== modelData.locale) { profileModel.changeLocale(modelData.locale) appSettings.locale = modelData.locale }