From 77a4615031dc1c76acdeb073f656d8bcfa4534a9 Mon Sep 17 00:00:00 2001 From: Kongfa Waroros Date: Sat, 6 Feb 2021 20:32:21 +0700 Subject: [PATCH] Update all AnimationTree's editors when editing (cherry picked from commit 0f17fe642c8ec21b7877cd3f6911f22ba0874255) --- editor/plugins/animation_tree_editor_plugin.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp index 891657720cc..9c706b45107 100644 --- a/editor/plugins/animation_tree_editor_plugin.cpp +++ b/editor/plugins/animation_tree_editor_plugin.cpp @@ -57,10 +57,11 @@ void AnimationTreeEditor::edit(AnimationTree *p_tree) { Vector path; if (tree && tree->has_meta("_tree_edit_path")) { path = tree->get_meta("_tree_edit_path"); - edit_path(path); } else { current_root = 0; } + + edit_path(path); } void AnimationTreeEditor::_path_button_pressed(int p_path) { @@ -127,6 +128,11 @@ void AnimationTreeEditor::edit_path(const Vector &p_path) { } else { current_root = 0; edited_path = button_path; + + for (int i = 0; i < editors.size(); i++) { + editors[i]->edit(Ref()); + editors[i]->hide(); + } } _update_path();