fix path bug, use lower case local variable names please
This commit is contained in:
parent
b3f13be336
commit
97767241e4
|
@ -335,8 +335,8 @@ wxString EXPORT_HELP::MakeCommandLine( const wxString& aFormatString,
|
||||||
wxFileName out = aFinalFile;
|
wxFileName out = aFinalFile;
|
||||||
|
|
||||||
ret.Replace( wxT("%B"), out.GetName().GetData(), true );
|
ret.Replace( wxT("%B"), out.GetName().GetData(), true );
|
||||||
ret.Replace( wxT("%I"), in.GetFullName().GetData(), true );
|
ret.Replace( wxT("%I"), in.GetFullPath().GetData(), true );
|
||||||
ret.Replace( wxT("%O"), out.GetFullName().GetData(), true );
|
ret.Replace( wxT("%O"), out.GetFullPath().GetData(), true );
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -398,6 +398,8 @@ bool WinEDA_SchematicFrame::WriteNetListFile( int aFormat, const wxString& aFull
|
||||||
wxFileName tmpFile = aFullFileName;
|
wxFileName tmpFile = aFullFileName;
|
||||||
tmpFile.SetExt( wxT( "tmp" ) );
|
tmpFile.SetExt( wxT( "tmp" ) );
|
||||||
|
|
||||||
|
D(printf("tmpFile:'%s'\n", CONV_TO_UTF8( tmpFile.GetFullPath() ) );)
|
||||||
|
|
||||||
ret = helper.WriteGENERICNetList( this, tmpFile.GetFullPath() );
|
ret = helper.WriteGENERICNetList( this, tmpFile.GetFullPath() );
|
||||||
if( !ret )
|
if( !ret )
|
||||||
break;
|
break;
|
||||||
|
@ -415,6 +417,8 @@ bool WinEDA_SchematicFrame::WriteNetListFile( int aFormat, const wxString& aFull
|
||||||
tmpFile.GetFullPath(),
|
tmpFile.GetFullPath(),
|
||||||
aFullFileName );
|
aFullFileName );
|
||||||
|
|
||||||
|
D(printf("commandLine:'%s'\n", CONV_TO_UTF8( commandLine ) );)
|
||||||
|
|
||||||
ProcessExecute( commandLine, wxEXEC_SYNC );
|
ProcessExecute( commandLine, wxEXEC_SYNC );
|
||||||
|
|
||||||
// ::wxRemoveFile( tmpFile.GetFullPath() );
|
// ::wxRemoveFile( tmpFile.GetFullPath() );
|
||||||
|
|
|
@ -227,7 +227,7 @@ WinEDA_NetlistFrame::WinEDA_NetlistFrame( WinEDA_SchematicFrame* parent ) :
|
||||||
// Add custom panels:
|
// Add custom panels:
|
||||||
InstallCustomPages();
|
InstallCustomPages();
|
||||||
|
|
||||||
GetSizer()->Fit( this );
|
// GetSizer()->Fit( this );
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
Centre();
|
Centre();
|
||||||
}
|
}
|
||||||
|
@ -442,10 +442,10 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
|
||||||
* and run the netlist creator
|
* and run the netlist creator
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
wxFileName fn;
|
wxFileName fn;
|
||||||
wxString FileWildcard, FileExt;
|
wxString fileWildcard;
|
||||||
wxString msg, Command;
|
wxString fileExt;
|
||||||
wxString title = _( "Save Netlist File" );
|
wxString title = _( "Save Netlist File" );
|
||||||
|
|
||||||
NetlistUpdateOpt();
|
NetlistUpdateOpt();
|
||||||
|
|
||||||
|
@ -458,30 +458,31 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
|
||||||
switch( CurrPage->m_IdNetType )
|
switch( CurrPage->m_IdNetType )
|
||||||
{
|
{
|
||||||
case NET_TYPE_SPICE:
|
case NET_TYPE_SPICE:
|
||||||
FileExt = wxT( "cir" );
|
fileExt = wxT( "cir" );
|
||||||
FileWildcard = _( "SPICE netlist file (.cir)|*.cir" );
|
fileWildcard = _( "SPICE netlist file (.cir)|*.cir" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NET_TYPE_CADSTAR:
|
case NET_TYPE_CADSTAR:
|
||||||
FileExt = wxT( "frp" );
|
fileExt = wxT( "frp" );
|
||||||
FileWildcard = _( "CadStar netlist file (.frp)|*.frp" );
|
fileWildcard = _( "CadStar netlist file (.frp)|*.frp" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NET_TYPE_PCBNEW:
|
case NET_TYPE_PCBNEW:
|
||||||
FileExt = NetlistFileExtension;
|
case NET_TYPE_ORCADPCB2:
|
||||||
FileWildcard = NetlistFileWildcard;
|
fileExt = NetlistFileExtension;
|
||||||
|
fileWildcard = NetlistFileWildcard;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: // custom
|
default: // custom, NET_TYPE_CUSTOM1 and greater
|
||||||
FileExt = wxT( "*" );
|
fileExt = wxEmptyString; // wxT( "" );
|
||||||
FileWildcard = AllFilesWildcard;
|
fileWildcard = AllFilesWildcard;
|
||||||
title = _( "Generic Export" );
|
title.Printf( _( "%s Export" ), CurrPage->m_TitleStringCtrl->GetValue().GetData() );
|
||||||
}
|
}
|
||||||
|
|
||||||
fn.SetExt( FileExt );
|
fn.SetExt( fileExt );
|
||||||
|
|
||||||
wxFileDialog dlg( this, title, fn.GetPath(),
|
wxFileDialog dlg( this, title, fn.GetPath(),
|
||||||
fn.GetFullName(), FileWildcard,
|
fn.GetFullName(), fileWildcard,
|
||||||
wxFD_SAVE );
|
wxFD_SAVE );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
|
|
Loading…
Reference in New Issue