Populate BOM plugins list if the list is empty

Fixes: lp:1464893
* https://bugs.launchpad.net/kicad/+bug/1464893
This commit is contained in:
Maciej Suminski
2018-11-19 16:17:53 +01:00
parent 15772e4b0b
commit 2ee2d9014a
3 changed files with 127 additions and 24 deletions
+15
View File
@@ -57,6 +57,21 @@ BOM_PLUGIN::BOM_PLUGIN( const wxString& aFile )
}
bool BOM_PLUGIN::IsPlugin( const wxString& aFile )
{
wxFileName fn( aFile );
wxString ext = fn.GetExt().Lower();
for( const auto& pluginExt : { "xsl", "py", "pyw" } )
{
if( pluginExt == ext )
return true;
}
return false;
}
wxString BOM_PLUGIN::readHeader( const wxString& aEndSection )
{
if( aEndSection.IsEmpty() )