Auto-select first item in layer mapping dialog

Fixes https://gitlab.com/kicad/code/kicad/issues/5942
This commit is contained in:
Michael Kavanagh 2020-10-16 17:07:15 +01:00 committed by Jon Evans
parent 16d5f95981
commit e826a4494a
1 changed files with 9 additions and 0 deletions

View File

@ -107,6 +107,9 @@ void DIALOG_IMPORTED_LAYERS::AddMappings()
}
DeleteListItems( rowsToDelete, m_unmatched_layers_list );
// Auto select the first item to improve ease-of-use
m_unmatched_layers_list->SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
}
@ -238,6 +241,9 @@ DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS( wxWindow* aParent,
++row;
}
// Auto select the first item to improve ease-of-use
m_unmatched_layers_list->SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
// Load the KiCad Layer names
row = 0;
LSEQ kicadLayersSeq = kiCadLayers.Seq();
@ -253,6 +259,9 @@ DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS( wxWindow* aParent,
++row;
}
// Auto select the first item to improve ease-of-use
m_kicad_layers_list->SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
m_sdbSizerOK->SetDefault();
Fit();