mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-18 19:39:17 +00:00
Do not call Select on an empty combobox
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19594
This commit is contained in:
parent
42a1d1cf0b
commit
2f96dfd5cb
@ -256,7 +256,8 @@ bool DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow()
|
||||
for( const wxString& sourceName : classNames )
|
||||
m_placementProperties->m_componentClassCombo->Append( sourceName );
|
||||
|
||||
m_placementProperties->m_componentClassCombo->Select( 0 );
|
||||
if( !classNames.empty() )
|
||||
m_placementProperties->m_componentClassCombo->Select( 0 );
|
||||
|
||||
// Fetch sheet names
|
||||
std::set<wxString> sheetNames;
|
||||
@ -267,7 +268,8 @@ bool DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow()
|
||||
for( const wxString& sourceName : sheetNames )
|
||||
m_placementProperties->m_sheetCombo->Append( sourceName );
|
||||
|
||||
m_placementProperties->m_sheetCombo->Select( 0 );
|
||||
if( !sheetNames.empty() )
|
||||
m_placementProperties->m_sheetCombo->Select( 0 );
|
||||
}
|
||||
|
||||
auto setupCurrentSourceSelection = [&]( wxComboBox* cb )
|
||||
|
Loading…
Reference in New Issue
Block a user