summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilc Renew <tokage.it.lab@gmail.com>2023-01-31 05:50:00 +0900
committerSilc Renew <tokage.it.lab@gmail.com>2023-01-31 19:34:26 +0900
commitfc22583b34db0bbaf243e65d87e03304df5fd720 (patch)
tree675c097eb90808fd27a2bd0e26fd6ccdff2846de
parent551f5191e5dbc1d1a43f99b13d5dbbf7f598dc58 (diff)
Fix broken bottom panel switching
-rw-r--r--editor/editor_node.cpp5
-rw-r--r--editor/editor_node.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index a1028a14c5..843712d8aa 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -581,6 +581,7 @@ void EditorNode::_notification(int p_what) {
ResourceImporterTexture::get_singleton()->update_imports();
+ bottom_panel_updating = false;
} break;
case NOTIFICATION_ENTER_TREE: {
@@ -5601,12 +5602,16 @@ void EditorNode::remove_bottom_panel_item(Control *p_item) {
}
void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
+ if (bottom_panel_updating) {
+ return;
+ }
ERR_FAIL_INDEX(p_idx, bottom_panel_items.size());
if (bottom_panel_items[p_idx].control->is_visible() == p_enable) {
return;
}
+ bottom_panel_updating = true;
if (p_enable) {
for (int i = 0; i < bottom_panel_items.size(); i++) {
bottom_panel_items[i].button->set_pressed(i == p_idx);
diff --git a/editor/editor_node.h b/editor/editor_node.h
index bb10abb589..3967f64c6b 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -460,6 +460,7 @@ private:
EditorToaster *editor_toaster = nullptr;
LinkButton *version_btn = nullptr;
Button *bottom_panel_raise = nullptr;
+ bool bottom_panel_updating = false;
Tree *disk_changed_list = nullptr;
ConfirmationDialog *disk_changed = nullptr;