Revert "Fixed TouchScreenButton::shape_centered having no effect"

This reverts commit 127c2d75ad.

This was a misunderstanding as #32725 is not a bug but expected
behavior.

Reverts #32927.
Supersedes and closes #33436.
This commit is contained in:
Rémi Verschelde 2019-11-08 10:54:36 +01:00
parent 621dc7022f
commit 3c0c8f26f9

View file

@ -325,12 +325,8 @@ void TouchScreenButton::_release(bool p_exiting_tree) {
}
Rect2 TouchScreenButton::_edit_get_rect() const {
if (texture.is_null()) {
if (shape.is_valid())
return shape->get_rect();
else
return CanvasItem::_edit_get_rect();
}
if (texture.is_null())
return CanvasItem::_edit_get_rect();
return Rect2(Size2(), texture->get_size());
}