Loading common/drawpanel_gal.cpp +12 −11 Original line number Original line Diff line number Diff line Loading @@ -78,12 +78,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_viewControls = new KiGfx::WX_VIEW_CONTROLS( m_view, this ); m_viewControls = new KiGfx::WX_VIEW_CONTROLS( m_view, this ); #if wxCHECK_VERSION( 2, 9, 0 ) Connect( KiGfx::EVT_GAL_REDRAW, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); Connect( KiGfx::EVT_GAL_REDRAW, wxPaintEventHandler( 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, wxPaintEventHandler( 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 ); } } Loading @@ -105,6 +100,18 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL() void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) { Refresh(); } void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) { m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); } void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { { m_gal->BeginDrawing(); m_gal->BeginDrawing(); m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0, 0, 0, 1.0 ) ); m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0, 0, 0, 1.0 ) ); Loading @@ -122,12 +129,6 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) } } void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) { m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); } void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) { { if( m_gal ) if( m_gal ) Loading include/class_drawpanel_gal.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -75,7 +75,7 @@ public: void SetView( KiGfx::VIEW* aView ) { m_view = aView; } void SetView( KiGfx::VIEW* aView ) { m_view = aView; } KiGfx::VIEW* GetView() const { return m_view; } KiGfx::VIEW* GetView() const { return m_view; } //void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); virtual void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); protected: protected: void onPaint( wxPaintEvent& aEvent ); void onPaint( wxPaintEvent& aEvent ); Loading Loading
common/drawpanel_gal.cpp +12 −11 Original line number Original line Diff line number Diff line Loading @@ -78,12 +78,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_viewControls = new KiGfx::WX_VIEW_CONTROLS( m_view, this ); m_viewControls = new KiGfx::WX_VIEW_CONTROLS( m_view, this ); #if wxCHECK_VERSION( 2, 9, 0 ) Connect( KiGfx::EVT_GAL_REDRAW, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); Connect( KiGfx::EVT_GAL_REDRAW, wxPaintEventHandler( 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, wxPaintEventHandler( 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 ); } } Loading @@ -105,6 +100,18 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL() void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) { Refresh(); } void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) { m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); } void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { { m_gal->BeginDrawing(); m_gal->BeginDrawing(); m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0, 0, 0, 1.0 ) ); m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0, 0, 0, 1.0 ) ); Loading @@ -122,12 +129,6 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) } } void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) { m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); } void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) { { if( m_gal ) if( m_gal ) Loading
include/class_drawpanel_gal.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -75,7 +75,7 @@ public: void SetView( KiGfx::VIEW* aView ) { m_view = aView; } void SetView( KiGfx::VIEW* aView ) { m_view = aView; } KiGfx::VIEW* GetView() const { return m_view; } KiGfx::VIEW* GetView() const { return m_view; } //void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); virtual void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); protected: protected: void onPaint( wxPaintEvent& aEvent ); void onPaint( wxPaintEvent& aEvent ); Loading