Commit e5db75a2 authored by emmedics4's avatar emmedics4

OSX: file opening sanity checks

parent b5bef0f2
......@@ -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();
......
......@@ -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 );
}
......
......@@ -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 );
}
......
......@@ -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 );
}
......
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