diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index 7956d13f8e..0bddcfd8bd 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -4291,9 +4291,6 @@ protected: bool m_lastKeyDownConsumed; - // Time until when we should ignore any new mouse wheel events. - wxLongLong m_timeToBlockWheelEventsUntil; - friend class ScintillaWX; friend class Platform; #endif // !SWIG diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 20aff095a3..15f1fcac53 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -199,7 +199,6 @@ bool wxStyledTextCtrl::Create(wxWindow *parent, m_swx = new ScintillaWX(this); m_stopWatch.Start(); m_lastKeyDownConsumed = false; - m_timeToBlockWheelEventsUntil = 0; m_vScrollBar = NULL; m_hScrollBar = NULL; #if wxUSE_UNICODE @@ -4258,25 +4257,11 @@ void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) { void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) { - // Prevent having an event queue with wheel events that cannot be processed - // reasonably fast (see ticket #9057) by ignoring all of them that happen - // during the time interval corresponding to the time it took us to handle - // the last one. - // - // Notice the use of TimeInMicro() instead of Time() to avoid overflow in - // long running programs. - if ( m_timeToBlockWheelEventsUntil <= m_stopWatch.TimeInMicro() ) - { - const wxLongLong beforeMouseWheel = m_stopWatch.TimeInMicro(); - m_swx->DoMouseWheel(evt.GetWheelRotation(), - evt.GetWheelDelta(), - evt.GetLinesPerAction(), - evt.ControlDown(), - evt.IsPageScroll()); - const wxLongLong afterMouseWheel = m_stopWatch.TimeInMicro(); - m_timeToBlockWheelEventsUntil = afterMouseWheel; - m_timeToBlockWheelEventsUntil += afterMouseWheel - beforeMouseWheel; - } + m_swx->DoMouseWheel(evt.GetWheelRotation(), + evt.GetWheelDelta(), + evt.GetLinesPerAction(), + evt.ControlDown(), + evt.IsPageScroll()); } diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index 10ceabad07..114d4b71be 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -199,7 +199,6 @@ bool wxStyledTextCtrl::Create(wxWindow *parent, m_swx = new ScintillaWX(this); m_stopWatch.Start(); m_lastKeyDownConsumed = false; - m_timeToBlockWheelEventsUntil = 0; m_vScrollBar = NULL; m_hScrollBar = NULL; #if wxUSE_UNICODE @@ -762,25 +761,11 @@ void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) { void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) { - // Prevent having an event queue with wheel events that cannot be processed - // reasonably fast (see ticket #9057) by ignoring all of them that happen - // during the time interval corresponding to the time it took us to handle - // the last one. - // - // Notice the use of TimeInMicro() instead of Time() to avoid overflow in - // long running programs. - if ( m_timeToBlockWheelEventsUntil <= m_stopWatch.TimeInMicro() ) - { - const wxLongLong beforeMouseWheel = m_stopWatch.TimeInMicro(); - m_swx->DoMouseWheel(evt.GetWheelRotation(), - evt.GetWheelDelta(), - evt.GetLinesPerAction(), - evt.ControlDown(), - evt.IsPageScroll()); - const wxLongLong afterMouseWheel = m_stopWatch.TimeInMicro(); - m_timeToBlockWheelEventsUntil = afterMouseWheel; - m_timeToBlockWheelEventsUntil += afterMouseWheel - beforeMouseWheel; - } + m_swx->DoMouseWheel(evt.GetWheelRotation(), + evt.GetWheelDelta(), + evt.GetLinesPerAction(), + evt.ControlDown(), + evt.IsPageScroll()); } diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index ab4ddab4ba..0526edef8b 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -489,9 +489,6 @@ protected: bool m_lastKeyDownConsumed; - // Time until when we should ignore any new mouse wheel events. - wxLongLong m_timeToBlockWheelEventsUntil; - friend class ScintillaWX; friend class Platform; #endif // !SWIG