mirror of
https://github.com/godotengine/godot.git
synced 2024-11-13 07:32:55 +00:00
-function remove_and_delete_child removed. Just use child.free() or child.queue_free() instead. Fixes #1603
This commit is contained in:
parent
b967bb73c2
commit
e7ba4eca9f
@ -295,7 +295,7 @@ void Node::add_child_notify(Node *p_child) {
|
||||
// to be used when not wanted
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void Node::remove_and_delete_child(Node *p_child) {
|
||||
|
||||
ERR_FAIL_NULL( p_child );
|
||||
@ -305,6 +305,7 @@ void Node::remove_and_delete_child(Node *p_child) {
|
||||
memdelete(p_child);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
void Node::remove_child_notify(Node *p_child) {
|
||||
|
||||
@ -1763,7 +1764,7 @@ void Node::_bind_methods() {
|
||||
ObjectTypeDB::bind_method(_MD("get_name"),&Node::get_name);
|
||||
ObjectTypeDB::bind_method(_MD("add_child","node:Node"),&Node::add_child);
|
||||
ObjectTypeDB::bind_method(_MD("remove_child","node:Node"),&Node::remove_child);
|
||||
ObjectTypeDB::bind_method(_MD("remove_and_delete_child","node:Node"),&Node::remove_and_delete_child);
|
||||
//ObjectTypeDB::bind_method(_MD("remove_and_delete_child","node:Node"),&Node::remove_and_delete_child);
|
||||
ObjectTypeDB::bind_method(_MD("get_child_count"),&Node::get_child_count);
|
||||
ObjectTypeDB::bind_method(_MD("get_children"),&Node::_get_children);
|
||||
ObjectTypeDB::bind_method(_MD("get_child:Node","idx"),&Node::get_child);
|
||||
|
@ -143,7 +143,7 @@ protected:
|
||||
virtual void add_child_notify(Node *p_child);
|
||||
virtual void remove_child_notify(Node *p_child);
|
||||
virtual void move_child_notify(Node *p_child);
|
||||
void remove_and_delete_child(Node *p_child);
|
||||
//void remove_and_delete_child(Node *p_child);
|
||||
|
||||
void _propagate_replace_owner(Node *p_owner,Node* p_by_owner);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user