diff --git a/common/eda_doc.cpp b/common/eda_doc.cpp index 2b5609be80..392439cab5 100644 --- a/common/eda_doc.cpp +++ b/common/eda_doc.cpp @@ -154,14 +154,12 @@ bool GetAssociatedDocument( wxFrame* frame, const wxString& LibPath, wxFileName CurrentFileName( fullfilename ); file_ext = CurrentFileName.GetExt(); - if( file_ext == wxT( "pdf" ) ) { success = OpenPDF( fullfilename ); return success; } - /* Try to launch some browser (usefull under linux) */ wxFileType* filetype; diff --git a/common/gestfich.cpp b/common/gestfich.cpp index 3bdb49f8e5..e09337ab85 100644 --- a/common/gestfich.cpp +++ b/common/gestfich.cpp @@ -737,13 +737,15 @@ bool OpenPDF( const wxString& file ) if( success && !command.IsEmpty() ) { success = ProcessExecute( command ); + if ( success ) + return success; } - else - success = false; + + success = false; + command.Empty(); if( !success ) { - command.Empty(); #ifndef __WINDOWS__ AddDelimiterString( filename ); /* here is a list of PDF viewers candidates */