Populate symbol library type choices from SCH_IO_MGR list.

This commit is contained in:
Alex Shvartzkop 2023-09-05 07:18:42 +03:00
parent b566f994bb
commit a5a93f808e
2 changed files with 13 additions and 4 deletions

View File

@ -75,6 +75,7 @@ enum {
ID_PANEL_SYM_LIB_LEGACY,
};
// clang-format on
/**
* Build a wxGridTableBase by wrapping an #SYMBOL_LIB_TABLE object.
@ -237,10 +238,16 @@ PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, P
wxArrayString pluginChoices;
pluginChoices.Add( SCH_IO_MGR::ShowType( SCH_IO_MGR::SCH_KICAD ) );
pluginChoices.Add( SCH_IO_MGR::ShowType( SCH_IO_MGR::SCH_LEGACY ) );
pluginChoices.Add( SCH_IO_MGR::ShowType( SCH_IO_MGR::SCH_DATABASE ) );
pluginChoices.Add( SCH_IO_MGR::ShowType( SCH_IO_MGR::SCH_CADSTAR_ARCHIVE ) );
for( const SCH_IO_MGR::SCH_FILE_T& type : SCH_IO_MGR::SCH_FILE_T_vector )
{
SCH_PLUGIN::SCH_PLUGIN_RELEASER pi( SCH_IO_MGR::FindPlugin( type ) );
if( !pi )
continue;
if( PLUGIN_FILE_DESC desc = pi->GetLibraryFileDesc() )
pluginChoices.Add( SCH_IO_MGR::ShowType( type ) );
}
EESCHEMA_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<EESCHEMA_SETTINGS>();

View File

@ -67,6 +67,7 @@
#include <settings/settings_manager.h>
#include <paths.h>
#include <macros.h>
// clang-format off
/**
@ -81,6 +82,7 @@ struct SUPPORTED_FILE_TYPE
IO_MGR::PCB_FILE_T m_Plugin;
};
// clang-format on
/**
* Traverser implementation that looks to find any and all "folder" libraries by looking for files