diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp index 1cb6189c3b..8537f921e9 100644 --- a/cvpcb/cvpcb.cpp +++ b/cvpcb/cvpcb.cpp @@ -42,6 +42,9 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) { wxFileName filename = fileName; wxString oldPath; WinEDA_CvpcbFrame * frame = ((WinEDA_CvpcbFrame*)GetTopWindow()); + + if(!filename.FileExists()) + return; if( frame->m_NetlistFileName.DirExists() ) oldPath = frame->m_NetlistFileName.GetPath(); diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index df45fe8bd1..73c430ec73 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -104,7 +104,12 @@ IMPLEMENT_APP( WinEDA_App ) * http://wiki.wxwidgets.org/WxMac-specific_topics */ void WinEDA_App::MacOpenFile(const wxString &fileName) { + wxFileName filename = fileName; WinEDA_SchematicFrame * frame = ((WinEDA_SchematicFrame*) GetTopWindow()); + + if(!filename.FileExists()) + return; + frame->LoadOneEEProject( fileName, false ); } diff --git a/gerbview/gerbview.cpp b/gerbview/gerbview.cpp index 1dc65894e9..e77a2d3266 100644 --- a/gerbview/gerbview.cpp +++ b/gerbview/gerbview.cpp @@ -62,7 +62,12 @@ IMPLEMENT_APP( WinEDA_App ) * http://wiki.wxwidgets.org/WxMac-specific_topics */ void WinEDA_App::MacOpenFile(const wxString &fileName) { + wxFileName filename = fileName; WinEDA_GerberFrame * frame = ((WinEDA_GerberFrame*)GetTopWindow()); + + if(!filename.FileExists()) + return; + frame->LoadOneGerberFile( fileName, FALSE ); } diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 1955482eac..ed9a7294c1 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -75,7 +75,12 @@ IMPLEMENT_APP( WinEDA_App ) * http://wiki.wxwidgets.org/WxMac-specific_topics */ void WinEDA_App::MacOpenFile(const wxString &fileName) { - WinEDA_PcbFrame * frame = ((WinEDA_PcbFrame*) GetTopWindow());; + wxFileName filename = fileName; + WinEDA_PcbFrame * frame = ((WinEDA_PcbFrame*) GetTopWindow()); + + if(!filename.FileExists()) + return; + frame->LoadOnePcbFile( fileName, FALSE ); }