- 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