diff --git a/eeschema/eeschema_jobs_handler.cpp b/eeschema/eeschema_jobs_handler.cpp index 3f5bd89241..195ddb90a1 100644 --- a/eeschema/eeschema_jobs_handler.cpp +++ b/eeschema/eeschema_jobs_handler.cpp @@ -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