Fix #23508 : A custom style set as default style in Prefs. is not used

Fix #23508 : A custom style set as default style in Prefs. is not used

Fixed by loading the preferences before loading the custom style. Also makes sure the custom style is complete, by initializing it with the built-in default style before loading.