Commit 3815087b authored by Felix Morgner's avatar Felix Morgner

changed implementation of MacOpenFile to make it open files when they are double clicked in Finder.

parent d3f28fb7
......@@ -56,21 +56,17 @@ void EDA_APP::MacOpenFile( const wxString &fileName )
frame->m_ProjectFileName = fn;
if( m_fileHistory.GetCount() )
if( !frame->m_ProjectFileName.FileExists() )
{
frame->m_ProjectFileName = m_fileHistory.GetHistoryFile( 0 );
if( !frame->m_ProjectFileName.FileExists() )
{
m_fileHistory.RemoveFileFromHistory( 0 );
}
else
{
wxCommandEvent cmd( 0, wxID_FILE1 );
frame->OnFileHistory( cmd );
}
m_fileHistory.RemoveFileFromHistory( 0 );
return;
}
wxCommandEvent loadEvent;
loadEvent.SetId(wxID_ANY);
frame->OnLoadProject(loadEvent);
wxString title = GetTitle() + wxT( " " ) + GetBuildVersion() +
wxT( " " ) + frame->m_ProjectFileName.GetFullPath();
......
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