]> git.saurik.com Git - wxWidgets.git/commit - src/stc/stc.cpp
Fix bug with mouse wheel scrolling wxStyledTextCtrl in long running programs.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 3 Feb 2012 00:21:45 +0000 (00:21 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 3 Feb 2012 00:21:45 +0000 (00:21 +0000)
commit7bd2132891238da6237dd5ba480fb60bba5975d4
treeeb71c84138049148cf3dcd59e778bbd713e3f877
parent9447a0d6af1eb8244f9b434767943df67dc47534
Fix bug with mouse wheel scrolling wxStyledTextCtrl in long running programs.

In long running programs the wxEvent time stamp could wrap around resulting in
all mouse wheel events being ignored in wxStyledTextCtrl as the comparison of
the (positive) time until which all the subsequent events were supposed to be
blocked and the (now negative) current event time stamp would be always false.

Fix this by using wxStopWatch::TimeInMicro() to avoid wraparound instead of
wxEvent::GetTimestamp().

Also rename the variable to have a more clear name as the original code wasn't
easy to understand.

Closes #9057.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/stc/stc.h
src/stc/stc.cpp
src/stc/stc.cpp.in
src/stc/stc.h.in