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 );
|
m_ViaTypeChoice->SetSelection( 2 );
|
||||||
break;
|
break;
|
||||||
case VIATYPE::NOT_DEFINED:
|
case VIATYPE::NOT_DEFINED:
|
||||||
m_ViaTypeChoice->SetSelection( 3 );
|
m_ViaTypeChoice->SetSelection( wxNOT_FOUND );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,22 +458,20 @@ bool DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow()
|
||||||
if( !m_viaY.IsIndeterminate() )
|
if( !m_viaY.IsIndeterminate() )
|
||||||
v->SetPosition( wxPoint( v->GetPosition().x, m_viaY.GetValue() ) );
|
v->SetPosition( wxPoint( v->GetPosition().x, m_viaY.GetValue() ) );
|
||||||
|
|
||||||
if( m_ViaTypeChoice->GetSelection() != 3)
|
switch( m_ViaTypeChoice->GetSelection() )
|
||||||
{
|
{
|
||||||
switch( m_ViaTypeChoice->GetSelection() )
|
case 0:
|
||||||
{
|
v->SetViaType( VIATYPE::THROUGH );
|
||||||
default:
|
v->SanitizeLayers();
|
||||||
case 0:
|
break;
|
||||||
v->SetViaType( VIATYPE::THROUGH );
|
case 1:
|
||||||
v->SanitizeLayers();
|
v->SetViaType( VIATYPE::MICROVIA );
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
v->SetViaType( VIATYPE::MICROVIA );
|
v->SetViaType( VIATYPE::BLIND_BURIED );
|
||||||
break;
|
break;
|
||||||
case 2:
|
default:
|
||||||
v->SetViaType( VIATYPE::BLIND_BURIED );
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto startLayer = static_cast<PCB_LAYER_ID>( m_ViaStartLayer->GetLayerSelection() );
|
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 );
|
m_ViaTypeLabel->Wrap( -1 );
|
||||||
fgViaRightSizer->Add( m_ViaTypeLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
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 );
|
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 = new wxChoice( m_sbViaSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ViaTypeChoiceNChoices, m_ViaTypeChoiceChoices, 0 );
|
||||||
m_ViaTypeChoice->SetSelection( 0 );
|
m_ViaTypeChoice->SetSelection( 0 );
|
||||||
|
|
|
@ -2822,7 +2822,7 @@
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="center_pane">0</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="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
|
|
Loading…
Reference in New Issue