]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/ScintillaWX.cpp
Changed wxStat, wxAccess and wxOpen to no longer
[wxWidgets.git] / src / stc / ScintillaWX.cpp
index 50bfac2f18b2b53a92956a4946ea0e883c52459c..10859100d6bd296dd46329734e0a115fa9e7520a 100644 (file)
@@ -467,8 +467,9 @@ void ScintillaWX::DoVScroll(int type, int pos) {
     ScrollTo(topLineNew);
 }
 
-
-void ScintillaWX::DoMouseWheel(int rotation, int delta, int linesPerAction, int ctrlDown) {
+void ScintillaWX::DoMouseWheel(int rotation, int delta,
+                               int linesPerAction, int ctrlDown,
+                               bool isPageScroll ) {
     int topLineNew = topLine;
     int lines;
 
@@ -485,7 +486,10 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta, int linesPerAction, int
         lines = wheelRotation / delta;
         wheelRotation -= lines * delta;
         if (lines != 0) {
-            lines *= linesPerAction;
+            if (isPageScroll)
+                lines = lines * LinesOnScreen();  // lines is either +1 or -1
+            else
+                lines *= linesPerAction;
             topLineNew -= lines;
             ScrollTo(topLineNew);
         }