Skip to content

Commit 7f6833e

Browse files
authored
Merge pull request #31378 from kryksyh/fix_assert_when_theme_file_is_changed
Fix assert when theme file is changed
2 parents 71c72ee + 1fe113c commit 7f6833e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/framework/ui/internal/uiconfiguration.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ void UiConfiguration::init()
136136
m_musicalFontChanged.notify();
137137
});
138138

139+
platformTheme()->platformThemeChanged().onNotify(this, [this]() {
140+
synchThemeWithSystemIfNecessary();
141+
});
142+
139143
m_uiArrangement.stateChanged(WINDOW_GEOMETRY_KEY).onNotify(this, [this]() {
140144
m_windowGeometryChanged.notify();
141145
});
@@ -165,10 +169,6 @@ void UiConfiguration::initThemes()
165169
{
166170
m_isFollowSystemTheme.val = settings()->value(UI_FOLLOW_SYSTEM_THEME_KEY).toBool();
167171

168-
platformTheme()->platformThemeChanged().onNotify(this, [this]() {
169-
synchThemeWithSystemIfNecessary();
170-
});
171-
172172
updateSystemThemeListeningStatus();
173173

174174
for (const ThemeCode& codeKey : allStandardThemeCodes()) {

0 commit comments

Comments
 (0)