A bit of cleaning code.
This commit is contained in:
parent
4fffd147f2
commit
da89f8a47a
|
@ -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.
|
* returns a wxWidgets wxColor from a KiCad color index with alpha value.
|
||||||
* Note that alpha support is not available on every wxWidgets platform. On
|
* 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
|
* 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
|
* means the alpha value has no effect and will be ignored.
|
||||||
* not supporting alpha.
|
|
||||||
* @return wxColour - given a KiCad color index with alpha value
|
* @return wxColour - given a KiCad color index with alpha value
|
||||||
*/
|
*/
|
||||||
inline wxColour MakeColour( EDA_COLOR_T aColor )
|
inline wxColour MakeColour( EDA_COLOR_T aColor )
|
||||||
{
|
{
|
||||||
#if wxCHECK_VERSION(2,8,5)
|
|
||||||
int alpha = GetAlpha( aColor );
|
int alpha = GetAlpha( aColor );
|
||||||
alpha = alpha ? alpha : wxALPHA_OPAQUE;
|
alpha = alpha ? alpha : wxALPHA_OPAQUE;
|
||||||
#endif
|
|
||||||
EDA_COLOR_T ndx = ColorGetBase( aColor );
|
EDA_COLOR_T ndx = ColorGetBase( aColor );
|
||||||
wxASSERT( ndx > UNSPECIFIED_COLOR && ndx < NBCOLORS );
|
wxASSERT( ndx > UNSPECIFIED_COLOR && ndx < NBCOLORS );
|
||||||
|
|
||||||
return wxColour( g_ColorRefs[ndx].m_Red,
|
return wxColour( g_ColorRefs[ndx].m_Red,
|
||||||
g_ColorRefs[ndx].m_Green,
|
g_ColorRefs[ndx].m_Green,
|
||||||
g_ColorRefs[ndx].m_Blue
|
g_ColorRefs[ndx].m_Blue
|
||||||
#if wxCHECK_VERSION(2,8,5)
|
|
||||||
,(unsigned char) alpha
|
,(unsigned char) alpha
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -215,11 +215,6 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
|
||||||
|
|
||||||
BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_parent, _( "Print Footprint" ) );
|
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( !printer.Print( this, &printout, true ) )
|
||||||
{
|
{
|
||||||
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
|
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
|
||||||
|
|
|
@ -490,12 +490,6 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
|
||||||
wxString title = _( "Print" );
|
wxString title = _( "Print" );
|
||||||
BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_parent, title );
|
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( !printer.Print( this, &printout, true ) )
|
||||||
{
|
{
|
||||||
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
|
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
|
||||||
|
|
|
@ -76,11 +76,7 @@ void PCB_EDIT_FRAME::ListNetsAndSelect( wxCommandEvent& event )
|
||||||
list.Add( Line );
|
list.Add( Line );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxCHECK_VERSION( 2, 9, 4 )
|
wxSingleChoiceDialog choiceDlg( this, wxEmptyString, _( "Select Net" ), list );
|
||||||
wxSingleChoiceDialog choiceDlg( this, wxEmptyString, _( "Select Net" ), list, (void**) NULL );
|
|
||||||
#else
|
|
||||||
wxSingleChoiceDialog choiceDlg( this, wxEmptyString, _( "Select Net" ), list, (char**) NULL );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if( (choiceDlg.ShowModal() == wxID_CANCEL) || (choiceDlg.GetSelection() == wxNOT_FOUND) )
|
if( (choiceDlg.ShowModal() == wxID_CANCEL) || (choiceDlg.GetSelection() == wxNOT_FOUND) )
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue