DIALOG_GENDRILL: fix incorrect initialization of drill coord origin option

Fix also missing board change mark when drill plot settings are modified.
This commit is contained in:
jean-pierre charras 2021-03-05 20:41:21 +01:00
parent b691c18bfc
commit d57f5b1a2c
4 changed files with 16 additions and 17 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2019 Jean_Pierre Charras <jp.charras at wanadoo.fr>
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -127,8 +127,7 @@ void DIALOG_GENDRILL::InitDisplayParams()
UpdatePrecisionOptions();
m_Check_Minimal->SetValue( m_MinimalHeader );
if( m_drillOriginIsAuxAxis )
m_Choice_Drill_Offset->SetSelection( 1 );
m_Choice_Drill_Offset->SetSelection( m_drillOriginIsAuxAxis ? 1 : 0 );
m_Check_Mirror->SetValue( m_Mirror );
m_Check_Merge_PTH_NPTH->SetValue( m_Merge_PTH_NPTH );
@ -185,11 +184,11 @@ void DIALOG_GENDRILL::InitDisplayParams()
}
// Display hole counts:
m_PlatedPadsCountInfoMsg-> SetLabel( wxString() << m_platedPadsHoleCount );
m_PlatedPadsCountInfoMsg->SetLabel( wxString() << m_platedPadsHoleCount );
m_NotPlatedPadsCountInfoMsg->SetLabel( wxString() << m_notplatedPadsHoleCount );
m_ThroughViasInfoMsg-> SetLabel( wxString() << m_throughViasCount );
m_MicroViasInfoMsg-> SetLabel( wxString() << m_microViasCount );
m_BuriedViasInfoMsg-> SetLabel( wxString() << m_blindOrBuriedViasCount );
m_ThroughViasInfoMsg->SetLabel( wxString() << m_throughViasCount );
m_MicroViasInfoMsg->SetLabel( wxString() << m_microViasCount );
m_BuriedViasInfoMsg->SetLabel( wxString() << m_blindOrBuriedViasCount );
// Output directory
m_outputDirectoryName->SetValue( m_plotOpts.GetOutputDirectory() );
@ -323,7 +322,7 @@ void DIALOG_GENDRILL::UpdateDrillParams()
dirStr = m_outputDirectoryName->GetValue();
dirStr.Replace( wxT( "\\" ), wxT( "/" ) );
m_plotOpts.SetOutputDirectory( dirStr );
m_drillOriginIsAuxAxis = m_Choice_Drill_Offset->GetSelection();
m_drillOriginIsAuxAxis = m_Choice_Drill_Offset->GetSelection() == 1;
m_plotOpts.SetUseAuxOrigin( m_drillOriginIsAuxAxis );
m_mapFileType = m_Choice_Drill_Map->GetSelection();
@ -345,7 +344,11 @@ void DIALOG_GENDRILL::UpdateDrillParams()
else
m_Precision = precisionListForMetric;
m_board->SetPlotOptions( m_plotOpts );
if( !m_plotOpts.IsSameAs( m_board->GetPlotOptions() ) )
{
m_board->SetPlotOptions( m_plotOpts );
m_pcbEditFrame->OnModify();
}
}

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -96,7 +96,7 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con
wxString m_Choice_Drill_OffsetChoices[] = { _("Absolute"), _("Drill/place file origin") };
int m_Choice_Drill_OffsetNChoices = sizeof( m_Choice_Drill_OffsetChoices ) / sizeof( wxString );
m_Choice_Drill_Offset = new wxRadioBox( this, wxID_ANY, _("Drill Origin"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_OffsetNChoices, m_Choice_Drill_OffsetChoices, 1, wxRA_SPECIFY_COLS );
m_Choice_Drill_Offset->SetSelection( 1 );
m_Choice_Drill_Offset->SetSelection( 0 );
m_Choice_Drill_Offset->SetToolTip( _("Choose the coordinate origin: absolute or relative to the drill/place file origin") );
bLeftSizer->Add( m_Choice_Drill_Offset, 0, wxALL|wxEXPAND, 5 );

View File

@ -14,7 +14,6 @@
<property name="file">dialog_gendrill_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_gendrill_base</property>
@ -26,7 +25,6 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -208,7 +206,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -829,7 +826,7 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
@ -1876,7 +1873,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!