diff --git a/gerbview/files.cpp b/gerbview/files.cpp index 4eeaf621c2..1c4675e0b9 100644 --- a/gerbview/files.cpp +++ b/gerbview/files.cpp @@ -6,7 +6,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2004-2017 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2004-2019 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 @@ -182,6 +182,7 @@ void GERBVIEW_FRAME::Files_io( wxCommandEvent& event ) bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName ) { + static int lastGerberFileWildcard = 0; wxString filetypes; wxArrayString filenamesList; wxFileName filename = aFullFileName; @@ -239,10 +240,12 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName ) filename.GetFullName(), filetypes, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE | wxFD_CHANGE_DIR ); + dlg.SetFilterIndex( lastGerberFileWildcard ); if( dlg.ShowModal() == wxID_CANCEL ) return false; + lastGerberFileWildcard = dlg.GetFilterIndex(); dlg.GetPaths( filenamesList ); m_mruPath = currentPath = dlg.GetDirectory(); }