mirror of
https://github.com/godotengine/godot
synced 2024-09-05 07:58:39 +00:00
Avoid accessing the theme too early in EditorRunBar
This commit is contained in:
parent
352ebe9725
commit
de1a1dd43e
|
@ -45,6 +45,10 @@ EditorRunBar *EditorRunBar::singleton = nullptr;
|
|||
|
||||
void EditorRunBar::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_POSTINITIALIZE: {
|
||||
_reset_play_buttons();
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
_update_play_buttons();
|
||||
pause_button->set_icon(get_theme_icon(SNAME("Pause"), SNAME("EditorIcons")));
|
||||
|
@ -434,8 +438,6 @@ EditorRunBar::EditorRunBar() {
|
|||
write_movie_button->set_tooltip_text(TTR("Enable Movie Maker mode.\nThe project will run at stable FPS and the visual and audio output will be recorded to a video file."));
|
||||
write_movie_button->connect("toggled", callable_mp(this, &EditorRunBar::_write_movie_toggled));
|
||||
|
||||
_reset_play_buttons();
|
||||
|
||||
quick_run = memnew(EditorQuickOpen);
|
||||
add_child(quick_run);
|
||||
quick_run->connect("quick_open", callable_mp(this, &EditorRunBar::_quick_run_selected));
|
||||
|
|
Loading…
Reference in a new issue