From 59201379682a34db63e65f703618739ec8be32bc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 7 Aug 2013 09:37:28 +0200 Subject: [PATCH] Removed frame limiter. --- common/drawpanel_gal.cpp | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index f85fceeed3..16c59c3ced 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -99,8 +99,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - - m_timeStamp = 0; } @@ -134,14 +132,6 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { - const unsigned int FPS_LIMIT = 40; - - // Framerate limiter - wxLongLong currentTimeStamp = wxGetLocalTimeMillis(); - // if( currentTimeStamp - m_timeStamp < ( 1000 / FPS_LIMIT ) ) - // return; - m_timeStamp = currentTimeStamp; - #ifdef __WXDEBUG__ prof_counter time; @@ -209,19 +199,23 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) m_currentGal = aGalType; } + void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) { - if(!m_eventDispatcher) + if( !m_eventDispatcher ) { aEvent.Skip(); return; - } else { - printf("evType %d\n", aEvent.GetEventType()); - m_eventDispatcher->DispatchWxEvent(aEvent); + } + else + { + printf( "evType %d\n", aEvent.GetEventType() ); + m_eventDispatcher->DispatchWxEvent( aEvent ); } } + KiGfx::VIEW_CONTROLS* EDA_DRAW_PANEL_GAL::GetViewControls() const { return m_viewControls; -} \ No newline at end of file +}