Fix current directory issue loading Gerbers.

Fixes: lp:1750361
* https://bugs.launchpad.net/kicad/+bug/1750361
This commit is contained in:
Jeff Young 2018-02-19 13:48:05 +00:00 committed by Wayne Stambaugh
parent 4b01c9e04e
commit 7e0ff6fe8d
1 changed files with 2 additions and 9 deletions

View File

@ -205,19 +205,12 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName )
return false;
dlg.GetPaths( filenamesList );
// @todo Take a closer look at the CWD switching here. The current working directory
// gets changed by wxFileDialog because the wxFD_CHANGE_DIR flag is set. Is this the
// appropriate behavior? The current working directory is not returned to the previous
// value so this may be an issue elsewhere.
currentPath = wxGetCwd();
m_mruPath = currentPath;
m_mruPath = currentPath = dlg.GetDirectory();
}
else
{
filenamesList.Add( aFullFileName );
currentPath = filename.GetPath();
m_mruPath = currentPath;
m_mruPath = currentPath = filename.GetPath();
}
// Set the busy cursor