Remove empty choice in Via type dropdown

Fixes https://gitlab.com/kicad/code/kicad/issues/3968
This commit is contained in:
Michael Kavanagh 2020-03-01 19:29:41 +00:00 committed by Seth Hillbrand
parent e359144305
commit 265c1663f9
3 changed files with 16 additions and 18 deletions

View File

@ -237,7 +237,7 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
m_ViaTypeChoice->SetSelection( 2 );
break;
case VIATYPE::NOT_DEFINED:
m_ViaTypeChoice->SetSelection( 3 );
m_ViaTypeChoice->SetSelection( wxNOT_FOUND );
break;
}
@ -458,11 +458,8 @@ bool DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow()
if( !m_viaY.IsIndeterminate() )
v->SetPosition( wxPoint( v->GetPosition().x, m_viaY.GetValue() ) );
if( m_ViaTypeChoice->GetSelection() != 3)
{
switch( m_ViaTypeChoice->GetSelection() )
{
default:
case 0:
v->SetViaType( VIATYPE::THROUGH );
v->SanitizeLayers();
@ -473,7 +470,8 @@ bool DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow()
case 2:
v->SetViaType( VIATYPE::BLIND_BURIED );
break;
}
default:
break;
}
auto startLayer = static_cast<PCB_LAYER_ID>( m_ViaStartLayer->GetLayerSelection() );

View File

@ -241,7 +241,7 @@ DIALOG_TRACK_VIA_PROPERTIES_BASE::DIALOG_TRACK_VIA_PROPERTIES_BASE( wxWindow* pa
m_ViaTypeLabel->Wrap( -1 );
fgViaRightSizer->Add( m_ViaTypeLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
wxString m_ViaTypeChoiceChoices[] = { _("Through"), _("Micro"), _("Blind/buried"), wxEmptyString };
wxString m_ViaTypeChoiceChoices[] = { _("Through"), _("Micro"), _("Blind/buried") };
int m_ViaTypeChoiceNChoices = sizeof( m_ViaTypeChoiceChoices ) / sizeof( wxString );
m_ViaTypeChoice = new wxChoice( m_sbViaSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ViaTypeChoiceNChoices, m_ViaTypeChoiceChoices, 0 );
m_ViaTypeChoice->SetSelection( 0 );

View File

@ -2822,7 +2822,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Through&quot; &quot;Micro&quot; &quot;Blind/buried&quot; &quot;&quot;</property>
<property name="choices">&quot;Through&quot; &quot;Micro&quot; &quot;Blind/buried&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>