Simplify previous fix to not include new strings.

This commit is contained in:
Jeff Young 2023-05-09 18:20:42 +01:00
parent fdcc97e604
commit e7d4b4aefc
1 changed files with 14 additions and 15 deletions

View File

@ -477,6 +477,7 @@ int EESCHEMA_JOBS_HANDLER::doSymExportSvg( JOB_SYM_EXPORT_SVG* aSvgJob,
{
for( int convert = 1; convert < ( symbol->HasConversion() ? 2 : 1 ) + 1; ++convert )
{
wxString filename;
wxFileName fn;
fn.SetPath( aSvgJob->m_outputDirectory );
@ -485,25 +486,23 @@ int EESCHEMA_JOBS_HANDLER::doSymExportSvg( JOB_SYM_EXPORT_SVG* aSvgJob,
//simplify the name if its single unit
if( symbol->IsMulti() )
{
fn.SetName( wxString::Format( wxS( "%s_%d%s" ),
symbol->GetName().Lower(),
unit,
convert == 2 ? wxS( "_demorgan" ) : wxS( "" ) ) );
wxPrintf( _( "Plotting symbol '%s' unit %d %sto '%s'\n" ),
symbol->GetName(),
unit,
convert == 2 ? _( "(De Morgan) " ) : wxString( "" ),
filename = wxString::Format( "%s_%d", symbol->GetName().Lower(), unit );
if( convert == 2 )
filename += wxS( "_demorgan" );
fn.SetName( filename );
wxPrintf( _( "Plotting symbol '%s' unit %d to '%s'\n" ), symbol->GetName(), unit,
fn.GetFullPath() );
}
else
{
fn.SetName( wxString::Format( wxS( "%s%s" ),
symbol->GetName().Lower(),
convert == 2 ? wxS( "_demorgan" ) : wxS( "" ) ) );
wxPrintf( _( "Plotting symbol '%s' %sto '%s'\n" ),
symbol->GetName(),
convert == 2 ? _( "(De Morgan) " ) : wxString( "" ),
fn.GetFullPath() );
filename = symbol->GetName().Lower();
if( convert == 2 )
filename += wxS( "_demorgan" );
wxPrintf( _( "Plotting symbol '%s' to '%s'\n" ), symbol->GetName(), fn.GetFullPath() );
}
// Get the symbol bounding box to fit the plot page to it