dialog_drc: fix a minor issue when saving dialog drc options.

Fixes #5623
https://gitlab.com/kicad/code/kicad/issues/5623
This commit is contained in:
jean-pierre charras 2020-09-14 17:45:39 +02:00
parent 8e80a4d2ed
commit 4cda653dbd
3 changed files with 8 additions and 2 deletions

View File

@ -92,7 +92,8 @@ DIALOG_DRC::~DIALOG_DRC()
PCBNEW_SETTINGS* settings = m_brdEditor->GetPcbNewSettings();
settings->m_DrcDialog.refill_zones = m_cbRefillZones->GetValue();
settings->m_DrcDialog.test_track_to_zone = m_cbReportAllTrackErrors->GetValue();
settings->m_DrcDialog.test_track_to_zone = m_cbReportTracksToZonesErrors->GetValue();
settings->m_DrcDialog.test_all_track_errors = m_cbReportAllTrackErrors->GetValue();
settings->m_DrcDialog.test_footprints = m_cbTestFootprints->GetValue();
settings->m_DrcDialog.severities = m_severities;
@ -144,7 +145,8 @@ void DIALOG_DRC::initValues()
auto cfg = m_brdEditor->GetPcbNewSettings();
m_cbRefillZones->SetValue( cfg->m_DrcDialog.refill_zones );
m_cbReportAllTrackErrors->SetValue( cfg->m_DrcDialog.test_track_to_zone );
m_cbReportTracksToZonesErrors->SetValue( cfg->m_DrcDialog.test_track_to_zone );
m_cbReportAllTrackErrors->SetValue( cfg->m_DrcDialog.test_all_track_errors );
m_cbTestFootprints->SetValue( cfg->m_DrcDialog.test_footprints );
m_severities = cfg->m_DrcDialog.severities;

View File

@ -212,6 +212,9 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
m_params.emplace_back( new PARAM<bool>( "drc_dialog.test_track_to_zone",
&m_DrcDialog.test_track_to_zone, false ) );
m_params.emplace_back( new PARAM<bool>( "drc_dialog.test_all_track_errors",
&m_DrcDialog.test_all_track_errors, false ) );
m_params.emplace_back( new PARAM<bool>( "drc_dialog.test_footprints",
&m_DrcDialog.test_footprints, false ) );

View File

@ -87,6 +87,7 @@ public:
{
bool refill_zones;
bool test_track_to_zone;
bool test_all_track_errors;
bool test_footprints;
int severities;
};