Remove empty choice in Via type dropdown
Fixes https://gitlab.com/kicad/code/kicad/issues/3968
This commit is contained in:
parent
e359144305
commit
265c1663f9
|
@ -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() );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -2822,7 +2822,7 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Through" "Micro" "Blind/buried" ""</property>
|
||||
<property name="choices">"Through" "Micro" "Blind/buried"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
|
Loading…
Reference in New Issue