diff --git a/eeschema/dialogs/dialog_sym_lib_table.cpp b/eeschema/dialogs/dialog_sym_lib_table.cpp index 1f735ae98b..f90c20f080 100644 --- a/eeschema/dialogs/dialog_sym_lib_table.cpp +++ b/eeschema/dialogs/dialog_sym_lib_table.cpp @@ -375,7 +375,8 @@ void DIALOG_SYMBOL_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event ) int last_row = m_cur_grid->GetNumberRows() - 1; wxFileName fn( filePath ); - m_cur_grid->SetCellValue( last_row, COL_NICKNAME, fn.GetName() ); + m_cur_grid->SetCellValue( last_row, COL_NICKNAME, + LIB_ID::FixIllegalChars( fn.GetName(), LIB_ID::ID_SCH ) ); // TODO the following code can detect only schematic types, not libs // SCH_IO_MGR needs to provide file extension information for libraries too diff --git a/pcbnew/dialogs/dialog_fp_lib_table.cpp b/pcbnew/dialogs/dialog_fp_lib_table.cpp index 5cd45ab306..d5a0bf2c49 100644 --- a/pcbnew/dialogs/dialog_fp_lib_table.cpp +++ b/pcbnew/dialogs/dialog_fp_lib_table.cpp @@ -742,7 +742,8 @@ void DIALOG_FP_LIB_TABLE::OnClickLibraryWizard( wxCommandEvent& event ) int last_row = libgrid->GetNumberRows() - 1; // Add the nickname: currently make it from filename - tbl->SetValue( last_row, COL_NICKNAME, it->GetDescription() ); + tbl->SetValue( last_row, COL_NICKNAME, + LIB_ID::FixIllegalChars( it->GetDescription(), LIB_ID::ID_PCB ) ); // Add the path: tbl->SetValue( last_row, COL_URI, it->GetAutoPath( dlg.GetLibScope() ) );