Fixed the mouse position for control when it is in a canvas_layer.

This commit is contained in:
Gen 2015-07-27 08:36:21 +08:00
parent 07c99e11f5
commit 88bf7f35e1

View file

@ -1146,6 +1146,8 @@ Matrix32 CanvasItem::get_canvas_transform() const {
if (canvas_layer)
return canvas_layer->get_transform();
else if (get_parent()->cast_to<CanvasItem>())
return get_parent()->cast_to<CanvasItem>()->get_canvas_transform();
else
return get_viewport()->get_canvas_transform();