changed implementation of MacOpenFile to make it open files when they are double clicked in Finder.
This commit is contained in:
parent
d3f28fb71c
commit
3815087b29
|
@ -56,20 +56,16 @@ void EDA_APP::MacOpenFile( const wxString &fileName )
|
||||||
|
|
||||||
frame->m_ProjectFileName = fn;
|
frame->m_ProjectFileName = fn;
|
||||||
|
|
||||||
if( m_fileHistory.GetCount() )
|
|
||||||
{
|
|
||||||
frame->m_ProjectFileName = m_fileHistory.GetHistoryFile( 0 );
|
|
||||||
|
|
||||||
if( !frame->m_ProjectFileName.FileExists() )
|
if( !frame->m_ProjectFileName.FileExists() )
|
||||||
{
|
{
|
||||||
m_fileHistory.RemoveFileFromHistory( 0 );
|
m_fileHistory.RemoveFileFromHistory( 0 );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
wxCommandEvent loadEvent;
|
||||||
wxCommandEvent cmd( 0, wxID_FILE1 );
|
loadEvent.SetId(wxID_ANY);
|
||||||
frame->OnFileHistory( cmd );
|
|
||||||
}
|
frame->OnLoadProject(loadEvent);
|
||||||
}
|
|
||||||
|
|
||||||
wxString title = GetTitle() + wxT( " " ) + GetBuildVersion() +
|
wxString title = GetTitle() + wxT( " " ) + GetBuildVersion() +
|
||||||
wxT( " " ) + frame->m_ProjectFileName.GetFullPath();
|
wxT( " " ) + frame->m_ProjectFileName.GetFullPath();
|
||||||
|
|
Loading…
Reference in New Issue