GerbView: remember last open gerber file dialog wildcard.
This is only for the current GerbView session. When GerbView is closed,
the last open gerber file dialog wildcard setting is lost.
(cherry picked from commit f20a1314ff
)
This commit is contained in:
parent
bc4cc00332
commit
17fdce01a9
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue