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
This commit is contained in:
Remco Burema 2021-04-09 15:12:28 +02:00
parent d48722fcd1
commit 8ee0e13394
No known key found for this signature in database
GPG key ID: 215C49431D43F98C

View file

@ -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;
}
}
}