summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvolzhs <volzhs@gmail.com>2018-04-16 21:53:54 +0900
committervolzhs <volzhs@gmail.com>2018-04-16 21:53:54 +0900
commit3ecf8eef37db55e50b2fd70a376cd60787f54203 (patch)
treefc1ca4982be036d5dff5b925b57f95af513f864a
parentaf0d547c020c8035842f6d0954e4040689e5b09b (diff)
Fix error spam with Sprite has compressed texture
Fix #18177
-rw-r--r--scene/2d/sprite.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index 16e22036c5..bc39368c88 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -331,6 +331,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;