From e98e9f72df3bdc76d5643b37ac2b68f2d64eaa36 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 29 Mar 2022 17:06:33 +0100 Subject: [PATCH] Only write Allow DRC Violations if enabled. Fixes https://gitlab.com/kicad/code/kicad/issues/11177 (cherry picked from commit b78a2603263368b6cb4e607489e312d513912dd7) --- pcbnew/dialogs/dialog_pns_settings.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/dialogs/dialog_pns_settings.cpp b/pcbnew/dialogs/dialog_pns_settings.cpp index ea13afae43..43ca143cc6 100644 --- a/pcbnew/dialogs/dialog_pns_settings.cpp +++ b/pcbnew/dialogs/dialog_pns_settings.cpp @@ -76,8 +76,12 @@ void DIALOG_PNS_SETTINGS::OnOkClick( wxCommandEvent& aEvent ) m_settings.SetOptimizeEntireDraggedTrack( m_optimizeEntireDraggedTrack->GetValue() ); m_settings.SetAutoPosture( m_autoPosture->GetValue() ); m_settings.SetFixAllSegments( m_fixAllSegments->GetValue() ); - m_settings.SetAllowDRCViolations( m_violateDrc->GetValue() ); - m_settings.SetFreeAngleMode( m_freeAngleMode->GetValue() ); + + if( m_violateDrc->IsEnabled() ) + m_settings.SetAllowDRCViolations( m_violateDrc->GetValue() ); + + if( m_freeAngleMode->IsEnabled() ) + m_settings.SetFreeAngleMode( m_freeAngleMode->GetValue() ); aEvent.Skip(); // ends returning wxID_OK (default behavior) }