From 7e0ff6fe8d299245454bdf130f1103a77e6ae831 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 19 Feb 2018 13:48:05 +0000 Subject: [PATCH] Fix current directory issue loading Gerbers. Fixes: lp:1750361 * https://bugs.launchpad.net/kicad/+bug/1750361 --- gerbview/files.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gerbview/files.cpp b/gerbview/files.cpp index e685cf9252..f659ae1232 100644 --- a/gerbview/files.cpp +++ b/gerbview/files.cpp @@ -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