Commit 045f7f0d authored by jean-pierre charras's avatar jean-pierre charras

Kicad manager, Gerbview: When running Gerbview from Kicad manger, set the...

Kicad manager, Gerbview: When running Gerbview from Kicad manger, set the Gerbview  CWD to the current project directory.
Therefore, when trying to open Gerber files, the default directory is now thecurrent project directory.
(fix Bug #1380088 )
parent a061eeb1
......@@ -437,12 +437,18 @@ void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event )
frame->Raise();
}
#include <wx/filefn.h>
void KICAD_MANAGER_FRAME::OnRunGerbview( wxCommandEvent& event )
{
// Gerbview is called without any file to open, because we do not know
// the list and the name of files to open (if any...).
// however we run it in the path of the project
wxFileName fn( GetProjectFileName() );
wxString cwd = wxGetCwd();
wxSetWorkingDirectory( fn.GetPathWithSep() );
Execute( this, GERBVIEW_EXE, wxEmptyString );
wxSetWorkingDirectory( cwd );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment