Symbol editor: adding a new library should not create legacy format.

Fixes https://gitlab.com/kicad/code/kicad/issues/4346
This commit is contained in:
Wayne Stambaugh 2020-05-07 11:25:48 -04:00
parent 26803f54f0
commit 3fbc2f9035
2 changed files with 4 additions and 3 deletions

View File

@ -500,8 +500,8 @@ bool LIB_EDIT_FRAME::AddLibraryFile( bool aCreateNew )
{
wxFileName fn = m_libMgr->GetUniqueLibraryName();
if( !LibraryFileBrowser( !aCreateNew, fn, SchematicLibraryFileWildcard(),
SchematicLibraryFileExtension, false ) )
if( !LibraryFileBrowser( !aCreateNew, fn, KiCadSymbolLibFileWildcard(),
KiCadSymbolLibFileExtension, false ) )
{
return false;
}

View File

@ -641,7 +641,8 @@ bool LIB_MANAGER::addLibrary( const wxString& aFilePath, bool aCreate, SYMBOL_LI
if( relPath.IsEmpty() )
relPath = aFilePath;
wxString typeName = SCH_IO_MGR::ShowType( SCH_IO_MGR::SCH_LEGACY );
SCH_IO_MGR::SCH_FILE_T schFileType = SCH_IO_MGR::GuessPluginTypeFromLibPath( aFilePath );
wxString typeName = SCH_IO_MGR::ShowType( schFileType );
SYMBOL_LIB_TABLE_ROW* libRow = new SYMBOL_LIB_TABLE_ROW( libName, relPath, typeName );
aTable->InsertRow( libRow );