Skip to content

Commit 5a8765b

Browse files
committed
Merge pull request godotengine#118352 from YeldhamDev/default_theme_preview_fix
Fix `Theme` editor's default preview not having the correct theme
2 parents 57d4250 + 022bbc1 commit 5a8765b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

editor/scene/gui/theme_editor_preview.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,9 @@ void ThemeEditorPreview::_notification(int p_what) {
214214
}
215215
} break;
216216

217-
case NOTIFICATION_READY: {
217+
// Due to NOTIFICATION_READY being called only once, and theme contexts being destroyed on node removal,
218+
// this is the notification needed, as it can be triggered indefinitely.
219+
case NOTIFICATION_POST_ENTER_TREE: {
218220
Vector<Ref<Theme>> preview_themes;
219221
preview_themes.push_back(ThemeDB::get_singleton()->get_default_theme());
220222
ThemeDB::get_singleton()->create_theme_context(preview_root, preview_themes);

0 commit comments

Comments
 (0)