Merge pull request #76513 from YuriSizov/editor-dont-run-too-fast
Avoid accessing the theme too early in EditorRunBar
This commit is contained in:
commit
b81387d6b7
1 changed files with 4 additions and 2 deletions
|
@ -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