From 8ee0e13394492ce889e9eb7c08a5e30616a94cfc Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 9 Apr 2021 15:12:28 +0200 Subject: [PATCH] Remove hack that made older code work to make newer code work. Theme and Language (in the interface) would stay on 'Colorblind Assist' and empty respectively, even if the actual theme (and obvioulsy the language) where different. CURA-8161 --- resources/qml/Preferences/GeneralPage.qml | 29 ----------------------- 1 file changed, 29 deletions(-) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index f17fa9c05f..e6872170d1 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -197,20 +197,6 @@ UM.PreferencesPage } } onActivated: UM.Preferences.setValue("general/language", model.get(index).code) - - Component.onCompleted: - { - // Because ListModel is stupid and does not allow using qsTr() for values. - for(var i = 0; i < languageList.count; ++i) - { - languageList.setProperty(i, "text", catalog.i18n(languageList.get(i).text)); - } - - // Glorious hack time. ComboBox does not update the text properly after changing the - // model. So change the indices around to force it to update. - currentIndex += 1; - currentIndex -= 1; - } } Label @@ -265,21 +251,6 @@ UM.PreferencesPage return 0; } onActivated: UM.Preferences.setValue("general/theme", model.get(index).code) - - Component.onCompleted: - { - // Because ListModel is stupid and does not allow using qsTr() for values. - for(var i = 0; i < themeList.count; ++i) - { - themeList.setProperty(i, "text", catalog.i18n(themeList.get(i).text)); - } - - // Glorious hack time. ComboBox does not update the text properly after changing the - // model. So change the indices around to force it to update. - currentIndex += 1; - currentIndex -= 1; - } - } }