Fixed bug with a text editor with a space in the name on OSX
This commit is contained in:
parent
c3589b5558
commit
57d4c90055
|
@ -44,10 +44,10 @@
|
||||||
|
|
||||||
void AddDelimiterString( wxString& string )
|
void AddDelimiterString( wxString& string )
|
||||||
{
|
{
|
||||||
if ( string.length() > 0 && !string.StartsWith( wxT( "\"" ) ) )
|
if ( !string.StartsWith( wxT( "\"" ) ) )
|
||||||
{
|
{
|
||||||
string.Prepend( "\"" );
|
string.Prepend ( wxT( "\"" ) );
|
||||||
string.Append( "\"" );
|
string.Append ( wxT( "\"" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,6 +221,8 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& para
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
AddDelimiterString( fullFileName );
|
||||||
|
|
||||||
if( !param.IsEmpty() )
|
if( !param.IsEmpty() )
|
||||||
fullFileName += wxT( " " ) + param;
|
fullFileName += wxT( " " ) + param;
|
||||||
|
|
||||||
|
@ -341,16 +343,17 @@ wxString KicadDatasPath()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool OpenPDF( const wxString& filename )
|
bool OpenPDF( const wxString& file )
|
||||||
{
|
{
|
||||||
wxString command;
|
wxString command;
|
||||||
|
wxString filename = file;
|
||||||
|
|
||||||
Pgm().ReadPdfBrowserInfos();
|
Pgm().ReadPdfBrowserInfos();
|
||||||
|
|
||||||
if( !Pgm().UseSystemPdfBrowser() ) // Run the preferred PDF Browser
|
if( !Pgm().UseSystemPdfBrowser() ) // Run the preferred PDF Browser
|
||||||
{
|
{
|
||||||
AddDelimiterString( filename );
|
AddDelimiterString( filename );
|
||||||
command = AddDelimiterString( Pgm().GetPdfBrowserName() ) + wxT( " " ) + filename;
|
command = Pgm().GetPdfBrowserName() + wxT( " " ) + filename;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue