Pcbnew: fix Bug #1540967 (zone keepout incorrectly created if previously a corner-smoothed copper zone was created). This option (non relevant for a zone keepout) is now cleared.

This commit is contained in:
jean-pierre charras 2016-02-02 21:32:11 +01:00
parent 783f818f19
commit 50db57f4d5
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; break;
case T_chamfer: 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; break;
case T_fillet: 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; break;
default: default:
@ -2708,7 +2710,9 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR )
break; break;
case T_radius: 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(); NeedRIGHT();
break; break;

View File

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