From 2823251c2fcce79ee00effb4c305ab6bcdb05d3b Mon Sep 17 00:00:00 2001 From: Michael Alexsander Silva Dias Date: Fri, 30 Nov 2018 01:59:29 -0200 Subject: [PATCH] Fix ItemList editor not hiding on node removal --- editor/plugins/item_list_editor_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp index 8df40232b05..a32f42cc56d 100644 --- a/editor/plugins/item_list_editor_plugin.cpp +++ b/editor/plugins/item_list_editor_plugin.cpp @@ -265,6 +265,9 @@ void ItemListEditor::_notification(int p_notification) { add_button->set_icon(get_icon("Add", "EditorIcons")); del_button->set_icon(get_icon("Remove", "EditorIcons")); + } else if (p_notification == NOTIFICATION_READY) { + + get_tree()->connect("node_removed", this, "_node_removed"); } } @@ -341,6 +344,7 @@ bool ItemListEditor::handles(Object *p_object) const { void ItemListEditor::_bind_methods() { + ClassDB::bind_method("_node_removed", &ItemListEditor::_node_removed); ClassDB::bind_method("_edit_items", &ItemListEditor::_edit_items); ClassDB::bind_method("_add_button", &ItemListEditor::_add_pressed); ClassDB::bind_method("_delete_button", &ItemListEditor::_delete_pressed);