diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index d2ae49977f..2aeec34798 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -805,7 +805,7 @@ void OPENGL_GAL::drawTriangulatedPolyset( const SHAPE_POLY_SET& aPolySet ) if( isFillEnabled ) { - for( int j = 0; j < aPolySet.OutlineCount(); ++j ) + for( unsigned int j = 0; j < aPolySet.TriangulatedPolyCount(); ++j ) { auto triPoly = aPolySet.TriangulatedPolygon( j ); diff --git a/include/geometry/shape_poly_set.h b/include/geometry/shape_poly_set.h index 00b56f786a..8714c5d13c 100644 --- a/include/geometry/shape_poly_set.h +++ b/include/geometry/shape_poly_set.h @@ -548,6 +548,9 @@ class SHAPE_POLY_SET : public SHAPE */ bool IsSelfIntersecting(); + ///> Returns the number of triangulated polygons + unsigned int TriangulatedPolyCount() const { return m_triangulatedPolys.size(); } + ///> Returns the number of outlines in the set int OutlineCount() const { return m_polys.size(); }