eeschema: Add "All supported formats" drop-down to the "Import Non Kicad Schematic" file dialog
This commit is contained in:
parent
716598ac24
commit
ab18c8e219
|
@ -615,6 +615,7 @@ void SCH_EDIT_FRAME::OnImportProject( wxCommandEvent& aEvent )
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
wxString fileFilters;
|
wxString fileFilters;
|
||||||
|
wxString allWildcards;
|
||||||
|
|
||||||
for( auto& loader : loaders )
|
for( auto& loader : loaders )
|
||||||
{
|
{
|
||||||
|
@ -622,8 +623,14 @@ void SCH_EDIT_FRAME::OnImportProject( wxCommandEvent& aEvent )
|
||||||
fileFilters += wxChar( '|' );
|
fileFilters += wxChar( '|' );
|
||||||
|
|
||||||
fileFilters += wxGetTranslation( loader.first );
|
fileFilters += wxGetTranslation( loader.first );
|
||||||
|
|
||||||
|
SCH_PLUGIN::SCH_PLUGIN_RELEASER plugin( SCH_IO_MGR::FindPlugin( loader.second ) );
|
||||||
|
wxCHECK( plugin, /*void*/ );
|
||||||
|
allWildcards += "*." + formatWildcardExt( plugin->GetFileExtension() ) + ";";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fileFilters = _( "All supported formats|" ) + allWildcards + "|" + fileFilters;
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Import Schematic" ), path, wxEmptyString, fileFilters,
|
wxFileDialog dlg( this, _( "Import Schematic" ), path, wxEmptyString, fileFilters,
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST ); // TODO
|
wxFD_OPEN | wxFD_FILE_MUST_EXIST ); // TODO
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue