SHAPE_POLY_SET: mark all newly added hole outlines as closed

This commit is contained in:
Tomasz Włostowski 2016-10-18 14:53:05 +02:00 committed by Maciej Suminski
parent 1924478558
commit 69cd7177b9
1 changed files with 5 additions and 1 deletions

View File

@ -54,6 +54,7 @@ int SHAPE_POLY_SET::NewOutline()
{
SHAPE_LINE_CHAIN empty_path;
POLYGON poly;
empty_path.SetClosed( true );
poly.push_back( empty_path );
m_polys.push_back( poly );
return m_polys.size() - 1;
@ -62,7 +63,10 @@ int SHAPE_POLY_SET::NewOutline()
int SHAPE_POLY_SET::NewHole( int aOutline )
{
m_polys.back().push_back( SHAPE_LINE_CHAIN() );
SHAPE_LINE_CHAIN empty_path;
empty_path.SetClosed( true );
m_polys.back().push_back( empty_path );
return m_polys.back().size() - 2;
}