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 )
This commit is contained in:
parent
a061eeb176
commit
045f7f0d4d
|
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue