A bit of cleaning code.

This commit is contained in:
jean-pierre charras 2015-07-08 19:46:24 +02:00
parent 4fffd147f2
commit da89f8a47a
4 changed files with 2 additions and 22 deletions

View File

@ -193,25 +193,20 @@ inline void ColorSetBrush( wxBrush *aBrush, EDA_COLOR_T aColor )
* returns a wxWidgets wxColor from a KiCad color index with alpha value.
* Note that alpha support is not available on every wxWidgets platform. On
* such platform the behavior is the same as for wxALPHA_OPAQUE and that
* means the alpha value has no effect and will be ignored. wxGtk 2.8.4 is
* not supporting alpha.
* means the alpha value has no effect and will be ignored.
* @return wxColour - given a KiCad color index with alpha value
*/
inline wxColour MakeColour( EDA_COLOR_T aColor )
{
#if wxCHECK_VERSION(2,8,5)
int alpha = GetAlpha( aColor );
alpha = alpha ? alpha : wxALPHA_OPAQUE;
#endif
EDA_COLOR_T ndx = ColorGetBase( aColor );
wxASSERT( ndx > UNSPECIFIED_COLOR && ndx < NBCOLORS );
return wxColour( g_ColorRefs[ndx].m_Red,
g_ColorRefs[ndx].m_Green,
g_ColorRefs[ndx].m_Blue
#if wxCHECK_VERSION(2,8,5)
,(unsigned char) alpha
#endif
);
}

View File

@ -215,11 +215,6 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_parent, _( "Print Footprint" ) );
#if !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0)
wxDC* dc = printout.GetDC();
( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi
#endif
if( !printer.Print( this, &printout, true ) )
{
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )

View File

@ -490,12 +490,6 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
wxString title = _( "Print" );
BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_parent, title );
// Alexander's patch had this removed altogether, waiting for testing.
#if 0 && !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0)
wxDC* dc = printout.GetDC();
( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi
#endif
if( !printer.Print( this, &printout, true ) )
{
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )

View File

@ -76,11 +76,7 @@ void PCB_EDIT_FRAME::ListNetsAndSelect( wxCommandEvent& event )
list.Add( Line );
}
#if wxCHECK_VERSION( 2, 9, 4 )
wxSingleChoiceDialog choiceDlg( this, wxEmptyString, _( "Select Net" ), list, (void**) NULL );
#else
wxSingleChoiceDialog choiceDlg( this, wxEmptyString, _( "Select Net" ), list, (char**) NULL );
#endif
wxSingleChoiceDialog choiceDlg( this, wxEmptyString, _( "Select Net" ), list );
if( (choiceDlg.ShowModal() == wxID_CANCEL) || (choiceDlg.GetSelection() == wxNOT_FOUND) )
return;