From 97767241e49d31d40cacbc5393ff18a8fa8df099 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 11 Aug 2010 09:47:16 -0500 Subject: [PATCH] fix path bug, use lower case local variable names please --- eeschema/netform.cpp | 8 ++++++-- eeschema/netlist_control.cpp | 35 ++++++++++++++++++----------------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index cc825a18c7..7384cae3ba 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -335,8 +335,8 @@ wxString EXPORT_HELP::MakeCommandLine( const wxString& aFormatString, wxFileName out = aFinalFile; ret.Replace( wxT("%B"), out.GetName().GetData(), true ); - ret.Replace( wxT("%I"), in.GetFullName().GetData(), true ); - ret.Replace( wxT("%O"), out.GetFullName().GetData(), true ); + ret.Replace( wxT("%I"), in.GetFullPath().GetData(), true ); + ret.Replace( wxT("%O"), out.GetFullPath().GetData(), true ); return ret; } @@ -398,6 +398,8 @@ bool WinEDA_SchematicFrame::WriteNetListFile( int aFormat, const wxString& aFull wxFileName tmpFile = aFullFileName; tmpFile.SetExt( wxT( "tmp" ) ); + D(printf("tmpFile:'%s'\n", CONV_TO_UTF8( tmpFile.GetFullPath() ) );) + ret = helper.WriteGENERICNetList( this, tmpFile.GetFullPath() ); if( !ret ) break; @@ -415,6 +417,8 @@ bool WinEDA_SchematicFrame::WriteNetListFile( int aFormat, const wxString& aFull tmpFile.GetFullPath(), aFullFileName ); + D(printf("commandLine:'%s'\n", CONV_TO_UTF8( commandLine ) );) + ProcessExecute( commandLine, wxEXEC_SYNC ); // ::wxRemoveFile( tmpFile.GetFullPath() ); diff --git a/eeschema/netlist_control.cpp b/eeschema/netlist_control.cpp index 5af4e9a4f0..fb6ecca5db 100644 --- a/eeschema/netlist_control.cpp +++ b/eeschema/netlist_control.cpp @@ -227,7 +227,7 @@ WinEDA_NetlistFrame::WinEDA_NetlistFrame( WinEDA_SchematicFrame* parent ) : // Add custom panels: InstallCustomPages(); - GetSizer()->Fit( this ); +// GetSizer()->Fit( this ); GetSizer()->SetSizeHints( this ); Centre(); } @@ -442,10 +442,10 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event ) * and run the netlist creator */ { - wxFileName fn; - wxString FileWildcard, FileExt; - wxString msg, Command; - wxString title = _( "Save Netlist File" ); + wxFileName fn; + wxString fileWildcard; + wxString fileExt; + wxString title = _( "Save Netlist File" ); NetlistUpdateOpt(); @@ -458,30 +458,31 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event ) switch( CurrPage->m_IdNetType ) { case NET_TYPE_SPICE: - FileExt = wxT( "cir" ); - FileWildcard = _( "SPICE netlist file (.cir)|*.cir" ); + fileExt = wxT( "cir" ); + fileWildcard = _( "SPICE netlist file (.cir)|*.cir" ); break; case NET_TYPE_CADSTAR: - FileExt = wxT( "frp" ); - FileWildcard = _( "CadStar netlist file (.frp)|*.frp" ); + fileExt = wxT( "frp" ); + fileWildcard = _( "CadStar netlist file (.frp)|*.frp" ); break; case NET_TYPE_PCBNEW: - FileExt = NetlistFileExtension; - FileWildcard = NetlistFileWildcard; + case NET_TYPE_ORCADPCB2: + fileExt = NetlistFileExtension; + fileWildcard = NetlistFileWildcard; break; - default: // custom - FileExt = wxT( "*" ); - FileWildcard = AllFilesWildcard; - title = _( "Generic Export" ); + default: // custom, NET_TYPE_CUSTOM1 and greater + fileExt = wxEmptyString; // wxT( "" ); + fileWildcard = AllFilesWildcard; + title.Printf( _( "%s Export" ), CurrPage->m_TitleStringCtrl->GetValue().GetData() ); } - fn.SetExt( FileExt ); + fn.SetExt( fileExt ); wxFileDialog dlg( this, title, fn.GetPath(), - fn.GetFullName(), FileWildcard, + fn.GetFullName(), fileWildcard, wxFD_SAVE ); if( dlg.ShowModal() == wxID_CANCEL )