Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Hide status bar when no errors in AnimationTree

vaner-org4e3a0a706ddb
diff --git a/editor/animation/animation_tree_editor_plugin.cpp b/editor/animation/animation_tree_editor_plugin.cpp
index c6136a68f78..fbf2493fe0b 100644
--- a/editor/animation/animation_tree_editor_plugin.cpp
+++ b/editor/animation/animation_tree_editor_plugin.cpp
@@ -130,6 +130,7 @@ void AnimationTreeEditor::_update_error_message() {
last_error_key = String();
error_button->hide();
error_scroll->hide();
+ status_bar->hide(); // Since status bar is currently only used for errors.
current_scope_error_label->clear();
return;
}
@@ -272,6 +273,7 @@ void AnimationTreeEditor::_update_error_message() {
error_button->set_text(itos(count));
error_button->show();
+ status_bar->show();
}
void AnimationTreeEditor::edit(AnimationTree *p_tree) {
@@ -547,8 +549,9 @@ AnimationTreeEditor::AnimationTreeEditor() {
editor_base->set_v_size_flags(SIZE_EXPAND_FILL);
editor_vbox->add_child(editor_base);
- HBoxContainer *status_bar = memnew(HBoxContainer);
+ status_bar = memnew(HBoxContainer);
editor_vbox->add_child(status_bar);
+ status_bar->hide();
current_scope_error_label = memnew(RichTextLabel);
current_scope_error_label->set_fit_content(true);
diff --git a/editor/animation/animation_tree_editor_plugin.h b/editor/animation/animation_tree_editor_plugin.h
index ef63e8caa0d..b4cc0b01067 100644
--- a/editor/animation/animation_tree_editor_plugin.h
+++ b/editor/animation/animation_tree_editor_plugin.h
@@ -57,6 +57,7 @@ class AnimationTreeEditor : public EditorDock {
ScrollContainer *path_edit = nullptr;
HBoxContainer *path_hb = nullptr;
+ HBoxContainer *status_bar = nullptr;
RichTextLabel *current_scope_error_label = nullptr;
Button *error_button = nullptr;
ScrollContainer *error_scroll = nullptr;