Skip to content

Commit

Permalink
Don't edit x-y value if unused
Browse files Browse the repository at this point in the history
  • Loading branch information
sstendahl committed Dec 30, 2023
1 parent d9f7bb0 commit 12f824f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ def _on_pan_gesture(self, event_controller, x, y):
Determines what to do when a panning gesture is detected, pans the
canvas in the gesture direction.
"""
if self.get_application().get_shift():
x, y = y, x
if event_controller.get_unit() == Gdk.ScrollUnit.WHEEL:
x *= 10
y *= 10
if self.get_application().get_ctrl() is False:
if self.get_application().get_shift():
x, y = y, x
if event_controller.get_unit() == Gdk.ScrollUnit.WHEEL:
x *= 10
y *= 10
for ax in self.axes:
xmin, xmax, ymin, ymax = \
self._calculate_pan_values(ax, x, y)
Expand Down

0 comments on commit 12f824f

Please sign in to comment.