summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-04-09 00:49:48 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-04-09 00:49:48 -0300
commite7ba4eca9f7ea767d75db8ecc2d73c1e7c217b7e (patch)
tree6c00157224073af2aec5907d77d1f4bc996e1063
parentb967bb73c265904005957cb02148ccc7d53e6d8f (diff)
-function remove_and_delete_child removed. Just use child.free() or child.queue_free() instead. Fixes #1603
-rw-r--r--scene/main/node.cpp5
-rw-r--r--scene/main/node.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index fbdc87a7cc..145ce22453 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -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);
diff --git a/scene/main/node.h b/scene/main/node.h
index 47f49eb625..175c9a1a37 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -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);