Fix minor issues about translated strings and coding style. Add comment relative to file function info in X1 gerber file format.
This commit is contained in:
parent
db31daffe4
commit
7b5318ff64
|
@ -119,8 +119,7 @@ bool GERBER_PLOTTER::StartPlot()
|
|||
|
||||
if( ! m_attribFunction.IsEmpty() )
|
||||
{
|
||||
fprintf( outputFile, "%%TF.FileFunction,%s*%%\n",
|
||||
TO_UTF8( m_attribFunction ) );
|
||||
fprintf( outputFile, "%s\n", TO_UTF8( m_attribFunction ) );
|
||||
}
|
||||
|
||||
// Set coordinate format to 3.6 or 4.5 absolute, leading zero omitted
|
||||
|
|
|
@ -100,7 +100,7 @@ void DIALOG_PLOT_SCHEMATIC::CreateDXFFile( bool aPlotAll, bool aPlotFrameRef )
|
|||
}
|
||||
catch( IO_ERROR& e )
|
||||
{
|
||||
msg.Printf( _( "DXF Plotter Exception : '%s'"), wxString(e.errorText ) );
|
||||
msg.Printf( wxT( "DXF Plotter Exception : '%s'"), GetChars( e.errorText ) );
|
||||
m_MessagesBox->AppendText( msg );
|
||||
schframe->SetCurrentSheet( oldsheetpath );
|
||||
schframe->GetCurrentSheet().UpdateAllScreenReferences();
|
||||
|
|
|
@ -197,7 +197,7 @@ void DIALOG_PLOT_SCHEMATIC::createHPGLFile( bool aPlotAll, bool aPlotFrameRef )
|
|||
}
|
||||
catch( IO_ERROR& e )
|
||||
{
|
||||
msg.Printf( _( "HPGL Plotter Exception : '%s'"), wxString(e.errorText ) );
|
||||
msg.Printf( wxT( "HPGL Plotter Exception : '%s'"), GetChars( e.errorText ) );
|
||||
m_MessagesBox->AppendText( msg );
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef )
|
|||
catch( const IO_ERROR& e )
|
||||
{
|
||||
// Cannot plot PDF file
|
||||
msg.Printf( _( "PDF Plotter Exception : <%s>"), wxString(e.errorText ) );
|
||||
msg.Printf( wxT( "PDF Plotter Exception : <%s>"), GetChars( e.errorText ) );
|
||||
restoreEnvironment(plotter, oldsheetpath, msg);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ void DIALOG_PLOT_SCHEMATIC::createPSFile( bool aPlotAll, bool aPlotFrameRef )
|
|||
}
|
||||
catch( IO_ERROR& e )
|
||||
{
|
||||
msg.Printf( _( "PS Plotter Exception : '%s'"), wxString(e.errorText ) );
|
||||
msg.Printf( wxT( "PS Plotter Exception : '%s'"), GetChars( e.errorText ) );
|
||||
m_MessagesBox->AppendText( msg );
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
|
|||
catch( const IO_ERROR& e )
|
||||
{
|
||||
// Cannot plot SVG file
|
||||
msg.Printf( _( "SVG Plotter Exception : '%s'" ), wxString( e.errorText ) );
|
||||
msg.Printf( wxT( "SVG Plotter Exception : '%s'" ), GetChars( e.errorText ) );
|
||||
m_MessagesBox->AppendText( msg );
|
||||
|
||||
m_parent->SetCurrentSheet( oldsheetpath );
|
||||
|
@ -146,7 +146,7 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
|
|||
catch( const IO_ERROR& e )
|
||||
{
|
||||
// Cannot plot SVG file
|
||||
msg.Printf( _( "SVG Plotter Exception : <%s>"), wxString(e.errorText ) );
|
||||
msg.Printf( wxT( "SVG Plotter Exception : <%s>"), GetChars( e.errorText ) );
|
||||
m_MessagesBox->AppendText( msg );
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -84,9 +84,10 @@ const wxString GetGerberExtension( LAYER_NUM aLayer )
|
|||
}
|
||||
|
||||
|
||||
wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer )
|
||||
wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer,
|
||||
bool aUseX1CompatibilityMode )
|
||||
{
|
||||
wxString attrib = wxEmptyString;
|
||||
wxString attrib;
|
||||
|
||||
switch( aLayer )
|
||||
{
|
||||
|
@ -178,11 +179,18 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer )
|
|||
attrib += wxString( wxT( ",Mixed" ) );
|
||||
break;
|
||||
default:
|
||||
; // do nothing (but avoid a warning for unhandled LAYER_T values from GCC)
|
||||
break; // do nothing (but avoid a warning for unhandled LAYER_T values from GCC)
|
||||
}
|
||||
}
|
||||
|
||||
return attrib;
|
||||
wxString fileFct;
|
||||
|
||||
if( aUseX1CompatibilityMode )
|
||||
fileFct.Printf( "G04 #@! TF.FileFunction,%s*", GetChars( attrib ) );
|
||||
else
|
||||
fileFct.Printf( "%%TF.FileFunction,%s*%%", GetChars( attrib ) );
|
||||
|
||||
return fileFct;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -258,9 +258,12 @@ const wxString GetGerberExtension( LAYER_NUM aLayer );
|
|||
* the "%TF.FileFunction" attribute prefix and the "*%" suffix.
|
||||
* @param aBoard = the board, needed to get the total count of copper layers
|
||||
* @param aLayer = the layer number to create the attribute for
|
||||
* @param aUseX1CompatibilityMode = true to use a file function attribute like G04 comment
|
||||
* , compatible with X1 (rx274) notation (G04#@!TF.FileFunction)
|
||||
* @return The attribute, as a text string
|
||||
*/
|
||||
extern wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer );
|
||||
extern wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer,
|
||||
bool aUseX1CompatibilityMode );
|
||||
|
||||
// PLOTGERB.CPP
|
||||
void SelectD_CODE_For_LineDraw( PLOTTER* plotter, int aSize );
|
||||
|
|
|
@ -1005,8 +1005,12 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, PCB_PLOT_PARAMS *aPlotOpts,
|
|||
if( plotter->OpenFile( aFullFileName ) )
|
||||
{
|
||||
// For the Gerber "file function" attribute, set the layer number
|
||||
if( plotter->GetPlotterType() == PLOT_FORMAT_GERBER && plotOpts.GetUseGerberAttributes() )
|
||||
plotter->SetLayerAttribFunction( GetGerberFileFunction( aBoard, aLayer ) );
|
||||
if( plotter->GetPlotterType() == PLOT_FORMAT_GERBER )
|
||||
{
|
||||
bool useX2mode = plotOpts.GetUseGerberAttributes();
|
||||
plotter->SetLayerAttribFunction( GetGerberFileFunction( aBoard, aLayer,
|
||||
useX2mode ? false : true ) );
|
||||
}
|
||||
|
||||
plotter->StartPlot();
|
||||
|
||||
|
|
|
@ -631,7 +631,7 @@ void PCB_EDIT_FRAME::updateTraceWidthSelectBox()
|
|||
msg = _( "Track " ) + CoordinateToString( GetDesignSettings().m_TrackWidthList[ii], true );
|
||||
|
||||
if( ii == 0 )
|
||||
msg << _( " *" );
|
||||
msg << wxT( " *" );
|
||||
|
||||
m_SelTrackWidthBox->Append( msg );
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ void PCB_EDIT_FRAME::updateViaSizeSelectBox()
|
|||
<< CoordinateToString( GetDesignSettings().m_ViasDimensionsList[ii].m_Drill, true );
|
||||
|
||||
if( ii == 0 )
|
||||
msg << _( " *" );
|
||||
msg << wxT( " *" );
|
||||
|
||||
m_SelViaSizeBox->Append( msg );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue