Fixed incorrect polygon finishing in 45-degree mode (GAL).

This commit is contained in:
Maciej Suminski 2015-06-30 13:55:30 +02:00
parent 272f1b35b6
commit 5ca8e0b9d6
1 changed files with 4 additions and 0 deletions

View File

@ -1092,6 +1092,9 @@ int DRAWING_TOOL::drawZone( bool aKeepout )
assert( zone->GetNumCorners() > 2 ); assert( zone->GetNumCorners() > 2 );
// Finish the zone // Finish the zone
if( direction45 )
zone->AppendCorner( cursorPos == origin ? line45.GetStart() : line45.GetEnd() );
zone->Outline()->CloseLastContour(); zone->Outline()->CloseLastContour();
zone->Outline()->RemoveNullSegments(); zone->Outline()->RemoveNullSegments();
@ -1140,6 +1143,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout )
// Show options dialog // Show options dialog
ZONE_EDIT_T dialogResult; ZONE_EDIT_T dialogResult;
if( aKeepout ) if( aKeepout )
dialogResult = InvokeKeepoutAreaEditor( m_frame, &zoneInfo ); dialogResult = InvokeKeepoutAreaEditor( m_frame, &zoneInfo );
else else