summaryrefslogtreecommitdiffstats
path: root/editor/plugins/animation_blend_tree_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-08-29 11:57:54 +0200
committerGitHub <noreply@github.com>2022-08-29 11:57:54 +0200
commit0b8a63e47193ee3e6cd6c0986993a85fc693ca54 (patch)
treef924f74107842bd3c316f5c5c9ab5da810314c43 /editor/plugins/animation_blend_tree_editor_plugin.cpp
parent223e083d36ac1ca3f7aa46898d8870e476132f7a (diff)
parentfd6453c45ec0da79f2c7794b1c94f31fd6e477d7 (diff)
downloadredot-engine-0b8a63e47193ee3e6cd6c0986993a85fc693ca54.tar.gz
Merge pull request #65025 from akien-mga/revert-62846
Diffstat (limited to 'editor/plugins/animation_blend_tree_editor_plugin.cpp')
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 11054ee11e..8dd3223b19 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -799,10 +799,16 @@ 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: {
@@ -810,8 +816,7 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) {
} break;
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")));
+ _update_theme();
if (is_visible_in_tree()) {
_update_graph();