Merge pull request #62846 from AaronRecord/remove_redundant_theme_updates_in_enter_tree

Remove `NOTIFICATION_ENTER_TREE` when paired with `NOTIFICATION_THEME_CHANGED`
This commit is contained in:
Rémi Verschelde 2022-08-27 21:56:14 +02:00 committed by GitHub
commit d3db8bbebd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
98 changed files with 262 additions and 473 deletions

View file

@ -1544,10 +1544,9 @@ void AnimationNodeStateMachineEditor::_update_graph() {
void AnimationNodeStateMachineEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
case NOTIFICATION_TRANSLATION_CHANGED: {
case NOTIFICATION_TRANSLATION_CHANGED:
case NOTIFICATION_THEME_CHANGED: {
error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));