소스 검색

Fix error spam with Sprite has compressed texture

Fix #18177
volzhs 7 년 전
부모
커밋
3ecf8eef37
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      scene/2d/sprite.cpp

+ 3 - 0
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;