Implement OSX-specific method for opening project directory.

Sadly, the wxWidgets one doesn't work.

Fixes: lp:1804937
* https://bugs.launchpad.net/kicad/+bug/1804937
This commit is contained in:
Jeff Young 2018-11-24 16:18:09 +00:00
parent 05d9f49d25
commit c0d713b2d2
1 changed files with 9 additions and 0 deletions

View File

@ -489,10 +489,19 @@ void KICAD_MANAGER_FRAME::OnBrowseInFileExplorer( wxCommandEvent& event )
// open project directory in host OS's file explorer
wxString project_dir = Prj().GetProjectPath();
#ifdef __WXMAC__
wxString msg;
// Quote in case there are spaces in the path.
msg.Printf( "open \"%s\"", project_dir );
system( msg.c_str() );
#else
// Quote in case there are spaces in the path.
AddDelimiterString( project_dir );
wxLaunchDefaultApplication( project_dir );
#endif
}