OSX: file opening sanity checks
This commit is contained in:
parent
b5bef0f23b
commit
e5db75a290
|
@ -43,6 +43,9 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
|
||||||
wxString oldPath;
|
wxString oldPath;
|
||||||
WinEDA_CvpcbFrame * frame = ((WinEDA_CvpcbFrame*)GetTopWindow());
|
WinEDA_CvpcbFrame * frame = ((WinEDA_CvpcbFrame*)GetTopWindow());
|
||||||
|
|
||||||
|
if(!filename.FileExists())
|
||||||
|
return;
|
||||||
|
|
||||||
if( frame->m_NetlistFileName.DirExists() )
|
if( frame->m_NetlistFileName.DirExists() )
|
||||||
oldPath = frame->m_NetlistFileName.GetPath();
|
oldPath = frame->m_NetlistFileName.GetPath();
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,12 @@ IMPLEMENT_APP( WinEDA_App )
|
||||||
* http://wiki.wxwidgets.org/WxMac-specific_topics
|
* http://wiki.wxwidgets.org/WxMac-specific_topics
|
||||||
*/
|
*/
|
||||||
void WinEDA_App::MacOpenFile(const wxString &fileName) {
|
void WinEDA_App::MacOpenFile(const wxString &fileName) {
|
||||||
|
wxFileName filename = fileName;
|
||||||
WinEDA_SchematicFrame * frame = ((WinEDA_SchematicFrame*) GetTopWindow());
|
WinEDA_SchematicFrame * frame = ((WinEDA_SchematicFrame*) GetTopWindow());
|
||||||
|
|
||||||
|
if(!filename.FileExists())
|
||||||
|
return;
|
||||||
|
|
||||||
frame->LoadOneEEProject( fileName, false );
|
frame->LoadOneEEProject( fileName, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,12 @@ IMPLEMENT_APP( WinEDA_App )
|
||||||
* http://wiki.wxwidgets.org/WxMac-specific_topics
|
* http://wiki.wxwidgets.org/WxMac-specific_topics
|
||||||
*/
|
*/
|
||||||
void WinEDA_App::MacOpenFile(const wxString &fileName) {
|
void WinEDA_App::MacOpenFile(const wxString &fileName) {
|
||||||
|
wxFileName filename = fileName;
|
||||||
WinEDA_GerberFrame * frame = ((WinEDA_GerberFrame*)GetTopWindow());
|
WinEDA_GerberFrame * frame = ((WinEDA_GerberFrame*)GetTopWindow());
|
||||||
|
|
||||||
|
if(!filename.FileExists())
|
||||||
|
return;
|
||||||
|
|
||||||
frame->LoadOneGerberFile( fileName, FALSE );
|
frame->LoadOneGerberFile( fileName, FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,12 @@ IMPLEMENT_APP( WinEDA_App )
|
||||||
* http://wiki.wxwidgets.org/WxMac-specific_topics
|
* http://wiki.wxwidgets.org/WxMac-specific_topics
|
||||||
*/
|
*/
|
||||||
void WinEDA_App::MacOpenFile(const wxString &fileName) {
|
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 );
|
frame->LoadOnePcbFile( fileName, FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue