Merge pull request #65285 from YuriSizov/window-theme-change-is-imminent

Un-defer the initial theme changed notification in `Window`
This commit is contained in:
Rémi Verschelde 2022-09-03 18:23:45 +02:00 committed by GitHub
commit a653801b17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -865,9 +865,7 @@ void Window::_notification(int p_what) {
RS::get_singleton()->viewport_set_active(get_viewport_rid(), true); RS::get_singleton()->viewport_set_active(get_viewport_rid(), true);
} }
// Need to defer here, because theme owner information might be set in notification(NOTIFICATION_THEME_CHANGED);
// add_child_notify, which doesn't get called until right after this.
call_deferred(SNAME("notification"), NOTIFICATION_THEME_CHANGED);
} break; } break;
case NOTIFICATION_THEME_CHANGED: { case NOTIFICATION_THEME_CHANGED: {