Merge pull request #2306 from dbsGen/patch-1

Fixed the mouse position for control when it is in a canvas_layer.
This commit is contained in:
Rémi Verschelde 2015-12-10 17:06:27 +01:00
commit 3b68f0d051

View file

@ -1156,6 +1156,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();