diff options
| author | volzhs | 2018-04-16 21:53:54 +0900 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-04-28 22:54:54 +0200 |
| commit | 94ddb499df4083351fbf47cbc32a2cca77f5d74b (patch) | |
| tree | aaaae441e0c6299dad4922077d3c040f7c5feeb3 | |
| parent | 5a947ebc42c43f1d6f006d930f5d4161f36a28c6 (diff) | |
| download | godot-94ddb499df4083351fbf47cbc32a2cca77f5d74b.tar.gz godot-94ddb499df4083351fbf47cbc32a2cca77f5d74b.tar.zst godot-94ddb499df4083351fbf47cbc32a2cca77f5d74b.zip | |
Fix error spam with Sprite has compressed texture
Fix #18177
(cherry picked from commit 3ecf8eef37db55e50b2fd70a376cd60787f54203)
| -rw-r--r-- | scene/2d/sprite.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 7fbce16ae..7d3a98f15 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -307,6 +307,9 @@ bool Sprite::_edit_is_selected_on_click(const Point2 &p_point, double p_toleranc } ERR_FAIL_COND_V(image.is_null(), false); + if (image->is_compressed()) { + return dst_rect.has_point(p_point); + } bool is_repeat = texture->get_flags() & Texture::FLAG_REPEAT; bool is_mirrored_repeat = texture->get_flags() & Texture::FLAG_MIRRORED_REPEAT; |
