From f81642bbb3cd205badf551dc35b8940af1f28304 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 17 Jan 2023 11:19:53 -0500 Subject: [PATCH] Fix broken graphics import file filters. Fixes https://gitlab.com/kicad/code/kicad/-/issues/13570 --- eeschema/files-io.cpp | 5 +++-- pcbnew/files.cpp | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 4ac74d1417..7ad6591581 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 Wayne Stambaugh * Copyright (C) 2013 CERN (www.cern.ch) - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -616,7 +616,8 @@ void SCH_EDIT_FRAME::OnImportProject( wxCommandEvent& aEvent ) allWildcards += wxS( "*." ) + formatWildcardExt( plugin->GetFileExtension() ) + wxS( ";" ); } - fileFilters = _( "All supported formats|" ) + allWildcards + wxS( "|" ) + fileFilters; + fileFilters = _( "All supported formats" ) + wxS( "|" ) + allWildcards + wxS( "|" ) + + fileFilters; wxFileDialog dlg( this, _( "Import Schematic" ), path, wxEmptyString, fileFilters, wxFD_OPEN | wxFD_FILE_MUST_EXIST ); // TODO diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 627f920b65..21c4c5feb7 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2004-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 2016-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2016-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -166,10 +166,12 @@ bool AskLoadBoardFileName( PCB_EDIT_FRAME* aParent, int* aCtl, wxString* aFileNa PLUGIN::RELEASER plugin( IO_MGR::PluginFind( loaders[ii].pluginType ) ); wxCHECK( plugin, false ); - allWildcards += wxT( "*." ) + formatWildcardExt( plugin->GetFileExtension() ) + wxT( ";" ); + allWildcards += wxT( "*." ) + formatWildcardExt( plugin->GetFileExtension() ) + + wxT( ";" ); } - fileFilters = _( "All supported formats|" ) + allWildcards + wxT( "|" ) + fileFilters; + fileFilters = _( "All supported formats" ) + wxT( "|" ) + allWildcards + wxT( "|" ) + + fileFilters; }