Commit 08fbfa4e authored by segfault's avatar segfault Committed by intrigeri

Fix keyboard setting stored twice when language is set (refs: #17794)

I see that this is not super obvious, but KeyboardSettingUI.apply()
assumes that the keyboard setting was changed by the user, so it sets
IS_DEFAULT (which is somewhat misnamed, it should rather be
WAS_SET_AUTOMATICALLY (or WAS_SET_BY_USER, with the opposite value))
to false.

When the keyboard layout is changed automatically because the language
was changed, we want to set IS_DEFAULT to true, so we don't call
KeyboardSettingUI.apply(), but directly self._setting.save().

What was missing was the call to apply_layout_to_current_screen(), which
was causing #17794.
parent 9719ec19
......@@ -273,4 +273,4 @@ class KeyboardSettingUI(LocalizationSettingUI):
self.value = layout
self.update_value_label()
self._setting.save(layout, is_default=True)
self.apply()
self._setting.apply_layout_to_current_screen(self.value)
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