Only write Allow DRC Violations if enabled.

Fixes https://gitlab.com/kicad/code/kicad/issues/11177

(cherry picked from commit b78a260326)
This commit is contained in:
Jeff Young 2022-03-29 17:06:33 +01:00
parent f8ff9705ff
commit e98e9f72df
1 changed files with 6 additions and 2 deletions

View File

@ -76,7 +76,11 @@ void DIALOG_PNS_SETTINGS::OnOkClick( wxCommandEvent& aEvent )
m_settings.SetOptimizeEntireDraggedTrack( m_optimizeEntireDraggedTrack->GetValue() ); m_settings.SetOptimizeEntireDraggedTrack( m_optimizeEntireDraggedTrack->GetValue() );
m_settings.SetAutoPosture( m_autoPosture->GetValue() ); m_settings.SetAutoPosture( m_autoPosture->GetValue() );
m_settings.SetFixAllSegments( m_fixAllSegments->GetValue() ); m_settings.SetFixAllSegments( m_fixAllSegments->GetValue() );
if( m_violateDrc->IsEnabled() )
m_settings.SetAllowDRCViolations( m_violateDrc->GetValue() ); m_settings.SetAllowDRCViolations( m_violateDrc->GetValue() );
if( m_freeAngleMode->IsEnabled() )
m_settings.SetFreeAngleMode( m_freeAngleMode->GetValue() ); m_settings.SetFreeAngleMode( m_freeAngleMode->GetValue() );
aEvent.Skip(); // ends returning wxID_OK (default behavior) aEvent.Skip(); // ends returning wxID_OK (default behavior)