Code formatting
This commit is contained in:
parent
648803dcf7
commit
3cc0554e33
|
@ -407,7 +407,6 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
|
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
|
||||||
DisplayError( this, _( "There was a problem printing" ) );
|
DisplayError( this, _( "There was a problem printing" ) );
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -232,14 +232,12 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
|
||||||
wxPrintDialogData printDialogData( *s_PrintData );
|
wxPrintDialogData printDialogData( *s_PrintData );
|
||||||
wxPrinter printer( &printDialogData );
|
wxPrinter printer( &printDialogData );
|
||||||
|
|
||||||
BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_parent, _( "Print Footprint" ) );
|
BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_parent, _( "Print Footprint" ) );
|
||||||
|
|
||||||
if( !printer.Print( this, &printout, true ) )
|
if( !printer.Print( this, &printout, true ) )
|
||||||
{
|
{
|
||||||
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
|
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
|
||||||
DisplayError( this, _( "There was a problem printing." ) );
|
DisplayError( this, _( "There was a problem printing." ) );
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -103,9 +103,9 @@ private:
|
||||||
FinishDialogSettings();
|
FinishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetPrintParameters( );
|
void SetPrintParameters();
|
||||||
void SetPenWidth();
|
void SetPenWidth();
|
||||||
void initValues( );
|
void initValues();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -477,7 +477,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
|
||||||
|
|
||||||
void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
|
void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
SetPrintParameters( );
|
SetPrintParameters();
|
||||||
|
|
||||||
// If no layer selected, we have no plot. prompt user if it happens
|
// If no layer selected, we have no plot. prompt user if it happens
|
||||||
// because he could think there is a bug in Pcbnew:
|
// because he could think there is a bug in Pcbnew:
|
||||||
|
@ -490,17 +490,15 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
|
||||||
wxPrintDialogData printDialogData( *s_PrintData );
|
wxPrintDialogData printDialogData( *s_PrintData );
|
||||||
printDialogData.SetMaxPage( s_Parameters.m_PageCount );
|
printDialogData.SetMaxPage( s_Parameters.m_PageCount );
|
||||||
|
|
||||||
wxPrinter printer( &printDialogData );
|
wxPrinter printer( &printDialogData );
|
||||||
|
wxString title = _( "Print" );
|
||||||
|
BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_parent, title );
|
||||||
|
|
||||||
wxString title = _( "Print" );
|
|
||||||
BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_parent, title );
|
|
||||||
|
|
||||||
if( !printer.Print( this, &printout, true ) )
|
if( !printer.Print( this, &printout, true ) )
|
||||||
{
|
{
|
||||||
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
|
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
|
||||||
DisplayError( this, _( "There was a problem printing." ) );
|
DisplayError( this, _( "There was a problem printing." ) );
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue