dialog_sym_lib_table: gives an existing plugin type when creating a new entry in symbol library table

It avoids a strange (for an user) error message on creation.
This commit is contained in:
jean-pierre charras 2017-11-19 10:04:38 +01:00
parent 4c623daa1d
commit 06d0e593ba
1 changed files with 7 additions and 1 deletions

View File

@ -396,7 +396,13 @@ void DIALOG_SYMBOL_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
void DIALOG_SYMBOL_LIB_TABLE::appendRowHandler( wxCommandEvent& event )
{
if( m_cur_grid->AppendRows( 1 ) )
scrollToRow( m_cur_grid->GetNumberRows() - 1 );
{
int row = m_cur_grid->GetNumberRows() - 1;
// Gives a default type (currently, only one type exists):
m_cur_grid->SetCellValue( row, COL_TYPE,
SCH_IO_MGR::ShowType( SCH_IO_MGR::SCH_LEGACY ) );
scrollToRow( row );
}
}