Merge pull request #26762 from groud/fix_odd_texture_size_gizmo

Fixes bad gizmo alignment for textures with odd size
This commit is contained in:
Rémi Verschelde 2019-03-07 22:41:24 +01:00 committed by GitHub
commit 91fb807088
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -93,7 +93,7 @@ Rect2 AnimatedSprite::_get_rect() const {
Point2 ofs = offset;
if (centered)
ofs -= s / 2;
ofs -= Size2(s) / 2;
if (s == Size2(0, 0))
s = Size2(1, 1);

View file

@ -363,7 +363,7 @@ Rect2 Sprite::get_rect() const {
Point2 ofs = offset;
if (centered)
ofs -= s / 2;
ofs -= Size2(s) / 2;
if (s == Size2(0, 0))
s = Size2(1, 1);