We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efb40c1 commit 3eb8543Copy full SHA for 3eb8543
scene/2d/polygon_2d.cpp
@@ -96,7 +96,7 @@ bool Polygon2D::_edit_use_rect() const {
96
bool Polygon2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
97
Vector<Vector2> polygon2d = Variant(polygon);
98
if (internal_vertices > 0) {
99
- polygon2d.resize(polygon2d.size() - internal_vertices);
+ polygon2d.resize(MAX(polygon2d.size() - internal_vertices, 0));
100
}
101
return Geometry2D::is_point_in_polygon(p_point - get_offset(), polygon2d);
102
0 commit comments