]> 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 2cc5c6d876175d8511d4425c420d2af087f7cc19..10859100d6bd296dd46329734e0a115fa9e7520a 100644 (file)
@@ -110,7 +110,7 @@ public:
             CaptureMouse();
         }
         else {
-            ReleaseMouse();
+            if (HasCapture()) ReleaseMouse();
         }
         return retval;
     }
@@ -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);
         }
@@ -578,7 +582,8 @@ void ScintillaWX::DoCommand(int ID) {
 
 
 void ScintillaWX::DoContextMenu(Point pt) {
-    ContextMenu(pt);
+    if (displayPopupMenu)
+        ContextMenu(pt);
 }
 
 void ScintillaWX::DoOnListBox() {