Pcbnew: zone keepout incorrectly created if previously a corner-smoothed copper zone was created. (fixes lp:1540967)

This commit is contained in:
jean-pierre charras 2016-02-10 20:21:26 -05:00 committed by Wayne Stambaugh
parent ea0c187e09
commit 609b996abe
2 changed files with 11 additions and 4 deletions

View File

@ -2694,11 +2694,13 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR )
break;
case T_chamfer:
zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_CHAMFER );
if( !zone->GetIsKeepout() ) // smoothing has meaning only for filled zones
zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_CHAMFER );
break;
case T_fillet:
zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_FILLET );
if( !zone->GetIsKeepout() ) // smoothing has meaning only for filled zones
zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_FILLET );
break;
default:
@ -2708,7 +2710,9 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR )
break;
case T_radius:
zone->SetCornerRadius( parseBoardUnits( "corner radius" ) );
tmp = parseBoardUnits( "corner radius" );
if( !zone->GetIsKeepout() ) // smoothing has meaning only for filled zones
zone->SetCornerRadius( tmp );
NeedRIGHT();
break;

View File

@ -591,9 +591,12 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
if( GetToolId() == ID_PCB_KEEPOUT_AREA_BUTT )
{
zoneInfo.SetIsKeepout( true );
// Netcode and netname are irrelevant,
// Netcode, netname and some other settings are irrelevant,
// so ensure they are cleared
zone->SetNetCode( NETINFO_LIST::UNCONNECTED );
zoneInfo.SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_NONE );
zoneInfo.SetCornerRadius( 0 );
edited = InvokeKeepoutAreaEditor( this, &zoneInfo );
}
else