]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/ogl/_canvas.py
wxCheckListBox doesn't require wxUSE_OWNER_DRAWN when using WXUNIVERSAL
[wxWidgets.git] / wxPython / wx / lib / ogl / _canvas.py
index f5f75a1457dac26cbc6322f3799b44e47346b8ae..00c22ab7821bbb6143eba3fb0f4fff5ac42d4561 100644 (file)
@@ -93,10 +93,13 @@ class ShapeCanvas(wx.ScrolledWindow):
         # If we're very close to the position we started dragging
         # from, this may not be an intentional drag at all.
         if dragging:
         # If we're very close to the position we started dragging
         # from, this may not be an intentional drag at all.
         if dragging:
-            dx = abs(dc.LogicalToDeviceX(x - self._firstDragX))
-            dy = abs(dc.LogicalToDeviceY(y - self._firstDragY))
-            if self._checkTolerance and (dx <= self.GetDiagram().GetMouseTolerance()) and (dy <= self.GetDiagram().GetMouseTolerance()):
-                return
+            if self._checkTolerance:
+                # the difference between two logical coordinates is a logical coordinate
+                dx = abs(x - self._firstDragX) 
+                dy = abs(y - self._firstDragY)
+                toler = self.GetDiagram().GetMouseTolerance()
+                if (dx <= toler) and (dy <= toler):
+                    return
             # If we've ignored the tolerance once, then ALWAYS ignore
             # tolerance in this drag, even if we come back within
             # the tolerance range.
             # If we've ignored the tolerance once, then ALWAYS ignore
             # tolerance in this drag, even if we come back within
             # the tolerance range.