summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-06-14 02:13:47 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-06-14 02:13:47 -0300
commit8228fea02feabbfdd4def950e67f9ea6507d981d (patch)
tree95ccefb9330b693e44f20bddfbf8a6544ad34341 /scene
parentedf1f271180a8e2481ebb3d7808f47493e5ad13e (diff)
missing changes
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/split_container.cpp3
-rw-r--r--scene/main/node.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index d02c833be9..d7ee7a6b86 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -345,6 +345,7 @@ void SplitContainer::_input_event(const InputEvent& p_event) {
expand_ofs=drag_ofs+((vertical?mm.y:mm.x)-drag_from);
queue_sort();
+ emit_signal("dragged",get_split_offset());
}
}
@@ -431,11 +432,13 @@ void SplitContainer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_dragger_visible","visible"),&SplitContainer::set_dragger_visible);
ObjectTypeDB::bind_method(_MD("is_dragger_visible"),&SplitContainer::is_dragger_visible);
+ ADD_SIGNAL( MethodInfo("dragged",PropertyInfo(Variant::INT,"offset")));
ADD_PROPERTY( PropertyInfo(Variant::INT,"split/offset"),_SCS("set_split_offset"),_SCS("get_split_offset"));
ADD_PROPERTY( PropertyInfo(Variant::INT,"split/collapsed"),_SCS("set_collapsed"),_SCS("is_collapsed"));
ADD_PROPERTY( PropertyInfo(Variant::INT,"split/dragger_visible"),_SCS("set_dragger_visible"),_SCS("is_dragger_visible"));
+
}
SplitContainer::SplitContainer(bool p_vertical) {
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index ab530866bb..2530e3a36f 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -641,6 +641,7 @@ void Node::_add_child_nocheck(Node* p_child,const StringName& p_name) {
p_child->data.pos=data.children.size();
data.children.push_back( p_child );
p_child->data.parent=this;
+ p_child->notification(NOTIFICATION_PARENTED);
if (data.tree) {
p_child->_set_tree(data.tree);
@@ -649,7 +650,6 @@ void Node::_add_child_nocheck(Node* p_child,const StringName& p_name) {
/* Notify */
//recognize childs created in this node constructor
p_child->data.parent_owned=data.in_constructor;
- p_child->notification(NOTIFICATION_PARENTED);
add_child_notify(p_child);