Commit 0d854440 authored by Maciej Suminski's avatar Maciej Suminski
Browse files

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

parent ccd2ebef
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -101,9 +101,12 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
    m_painter = new KiGfx::PCB_PAINTER( m_gal );
    m_painter = new KiGfx::PCB_PAINTER( m_gal );
    m_view->SetPainter( m_painter );
    m_view->SetPainter( m_painter );


    // FIXME Cairo needs this to be uncommented to remove blinking on refreshing
#if wxCHECK_VERSION( 2, 9, 0 )
    // 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( 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 );
#endif
    Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this );
    Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this );
}
}