Fix for compatibility with wxWidgets 2.8 & 2.9 at the same time.

This commit is contained in:
Maciej Suminski 2013-04-10 10:09:23 +02:00
parent ccd2ebefd3
commit 0d85444062
1 changed files with 6 additions and 3 deletions

View File

@ -101,10 +101,13 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
m_painter = new KiGfx::PCB_PAINTER( m_gal );
m_view->SetPainter( m_painter );
#if wxCHECK_VERSION( 2, 9, 0 )
Connect( KiGfx::EVT_GAL_REDRAW, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this );
#elif wxCHECK_VERSION( 2, 8, 0 )
// FIXME Cairo needs this to be uncommented to remove blinking on refreshing
// Connect( wxEVT_PAINT, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this );
Connect(KiGfx::EVT_GAL_REDRAW, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this );
Connect(wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this );
Connect( wxEVT_PAINT, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this );
#endif
Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this );
}