summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-10-13 01:19:32 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-10-13 01:19:32 -0300
commitb3cda43a0fb49e1cb9c8414077a23fa4b61ede38 (patch)
tree1fee133b2fbc6f2bade96cc9914a449cbb9dbe1e /scene/2d
parent52e756752e1db9e4cf7c5bb7e92d44995ad674c4 (diff)
parentaad2bbdb6fb7c8217d7e75480b38e45f00cb3abd (diff)
Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts: platform/windows/detect.py
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/canvas_item.cpp2
-rw-r--r--scene/2d/collision_shape_2d.cpp4
-rw-r--r--scene/2d/sample_player_2d.cpp2
-rw-r--r--scene/2d/sprite.cpp1
4 files changed, 7 insertions, 2 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 49229ba500..357aaa225b 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -265,7 +265,7 @@ void CanvasItem::_propagate_visibility_changed(bool p_visible) {
CanvasItem *c=get_child(i)->cast_to<CanvasItem>();
- if (c && c->hidden!=p_visible) //should the toplevels stop propagation? i think so but..
+ if (c && !c->hidden) //should the toplevels stop propagation? i think so but..
c->_propagate_visibility_changed(p_visible);
}
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index cd89e914fb..85751fc735 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -113,6 +113,10 @@ void CollisionShape2D::_notification(int p_what) {
break;
}
+ if (!shape.is_valid()) {
+ break;
+ }
+
rect=Rect2();
diff --git a/scene/2d/sample_player_2d.cpp b/scene/2d/sample_player_2d.cpp
index bb37475944..ec17ffc55e 100644
--- a/scene/2d/sample_player_2d.cpp
+++ b/scene/2d/sample_player_2d.cpp
@@ -214,7 +214,7 @@ void SamplePlayer2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_sample_library","library:SampleLibrary"),&SamplePlayer2D::set_sample_library);
ObjectTypeDB::bind_method(_MD("get_sample_library:SampleLibrary"),&SamplePlayer2D::get_sample_library);
- ObjectTypeDB::bind_method(_MD("set_polyphony","voices"),&SamplePlayer2D::set_polyphony);
+ ObjectTypeDB::bind_method(_MD("set_polyphony","max_voices"),&SamplePlayer2D::set_polyphony);
ObjectTypeDB::bind_method(_MD("get_polyphony"),&SamplePlayer2D::get_polyphony);
ObjectTypeDB::bind_method(_MD("play","sample","voice"),&SamplePlayer2D::play,DEFVAL(NEXT_VOICE));
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index 6705cebf37..87697fc073 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -189,6 +189,7 @@ void Sprite::set_region_rect(const Rect2& p_region_rect) {
if (region && changed) {
update();
item_rect_changed();
+ _change_notify("region_rect");
}
}