瀏覽代碼

Button object used after pressed is called

 - by queueing for deletion node can call own cleanup methods
Cameron Reikes 6 年之前
父節點
當前提交
c69ff6833c
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      editor/editor_properties_array_dict.cpp

+ 2 - 1
editor/editor_properties_array_dict.cpp

@@ -312,7 +312,8 @@ void EditorPropertyArray::update_property() {
 		} else {
 			//bye bye children of the box
 			while (vbox->get_child_count() > 2) {
-				memdelete(vbox->get_child(2));
+				vbox->get_child(2)->queue_delete(); // button still needed after pressed is called
+				vbox->remove_child(vbox->get_child(2));
 			}
 		}