Fix error spam with Sprite has compressed texture

Fix #18177
This commit is contained in:
volzhs 2018-04-16 21:53:54 +09:00
parent af0d547c02
commit 3ecf8eef37
1 changed files with 3 additions and 0 deletions

View File

@ -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); 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_repeat = texture->get_flags() & Texture::FLAG_REPEAT;
bool is_mirrored_repeat = texture->get_flags() & Texture::FLAG_MIRRORED_REPEAT; bool is_mirrored_repeat = texture->get_flags() & Texture::FLAG_MIRRORED_REPEAT;