You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
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:
@@ -799,16 +799,10 @@ void AnimationNodeBlendTreeEditor::_update_editor_settings() {
|
||||
graph->set_warped_panning(bool(EditorSettings::get_singleton()->get("editors/panning/warped_mouse_panning")));
|
||||
}
|
||||
|
||||
void AnimationNodeBlendTreeEditor::_update_theme() {
|
||||
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")));
|
||||
}
|
||||
|
||||
void AnimationNodeBlendTreeEditor::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
_update_editor_settings();
|
||||
_update_theme();
|
||||
} break;
|
||||
|
||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||
@@ -816,7 +810,8 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
_update_theme();
|
||||
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")));
|
||||
|
||||
if (is_visible_in_tree()) {
|
||||
_update_graph();
|
||||
|
||||
Reference in New Issue
Block a user