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:
parent
26803f54f0
commit
3fbc2f9035
|
@ -500,8 +500,8 @@ bool LIB_EDIT_FRAME::AddLibraryFile( bool aCreateNew )
|
||||||
{
|
{
|
||||||
wxFileName fn = m_libMgr->GetUniqueLibraryName();
|
wxFileName fn = m_libMgr->GetUniqueLibraryName();
|
||||||
|
|
||||||
if( !LibraryFileBrowser( !aCreateNew, fn, SchematicLibraryFileWildcard(),
|
if( !LibraryFileBrowser( !aCreateNew, fn, KiCadSymbolLibFileWildcard(),
|
||||||
SchematicLibraryFileExtension, false ) )
|
KiCadSymbolLibFileExtension, false ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -641,7 +641,8 @@ bool LIB_MANAGER::addLibrary( const wxString& aFilePath, bool aCreate, SYMBOL_LI
|
||||||
if( relPath.IsEmpty() )
|
if( relPath.IsEmpty() )
|
||||||
relPath = aFilePath;
|
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 );
|
SYMBOL_LIB_TABLE_ROW* libRow = new SYMBOL_LIB_TABLE_ROW( libName, relPath, typeName );
|
||||||
aTable->InsertRow( libRow );
|
aTable->InsertRow( libRow );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue