Fix get_parent_range to return 0 when there is no parent

Fixes #15635
This commit is contained in:
Ruslan Mustakov 2018-01-13 16:48:07 +07:00
parent 7de3a11469
commit 0b632be4a9

View file

@ -1325,7 +1325,7 @@ float Control::_get_parent_range(int p_idx) const {
if (!is_inside_tree()) {
return 1.0;
return 0;
}
if (data.parent_canvas_item) {
@ -1334,7 +1334,7 @@ float Control::_get_parent_range(int p_idx) const {
return get_viewport()->get_visible_rect().size[p_idx & 1];
}
return 1.0;
return 0;
}
float Control::_get_range(int p_idx) const {