summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-12-02 17:08:56 +0100
committerGitHub <noreply@github.com>2018-12-02 17:08:56 +0100
commit3ee062908bc2b977ee65403c08f7a71be4972bba (patch)
tree74167243acac2dc7d721e21aa1bff7752d319ec5
parentbc269451e7a462eb0c3aa3bcdec55ab409c33253 (diff)
parent2823251c2fcce79ee00effb4c305ab6bcdb05d3b (diff)
Merge pull request #24079 from YeldhamDev/list_editor_hide_removal
Fix ItemList editor not hiding on node removal
-rw-r--r--editor/plugins/item_list_editor_plugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp
index 8df40232b0..a32f42cc56 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);