Merge pull request #61403 from lawnjelly/occpoly_gizmo_fix

This commit is contained in:
Rémi Verschelde 2022-05-25 12:55:08 +02:00 committed by GitHub
commit d020346c0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -5398,10 +5398,14 @@ void OccluderSpatialGizmo::redraw() {
const OccluderShapePolygon *occ_poly = get_occluder_shape_poly();
if (occ_poly) {
// main poly
_redraw_poly(false, occ_poly->_poly_pts_local, occ_poly->_poly_pts_local_raw);
if (occ_poly->_poly_pts_local_raw.size()) {
_redraw_poly(false, occ_poly->_poly_pts_local, occ_poly->_poly_pts_local_raw);
}
// hole
_redraw_poly(true, occ_poly->_hole_pts_local, occ_poly->_hole_pts_local_raw);
if (occ_poly->_hole_pts_local_raw.size()) {
_redraw_poly(true, occ_poly->_hole_pts_local, occ_poly->_hole_pts_local_raw);
}
}
}