Skip to content

Commit

Permalink
hopefully fixed windows scroll error
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas-Penzel committed Sep 6, 2019
1 parent cc17e93 commit a9d044e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ def on_mousewheel(self, event):
"""
Function which binds mouse wheel to scrolling the canvas
"""
if event.num == 5 or event.delta == -120 or event.delta == -1:
if event.num == 5 or event.delta < 0:
v = 1
if event.num == 4 or event.delta == 120 or event.delta == 1:
if event.num == 4 or event.delta > 0:
v = -1
self.canvas.yview_scroll(v, "units")

Expand Down Expand Up @@ -579,9 +579,9 @@ def on_edit_mousewheel(event):
"""
Function which binds mouse wheel to scrolling the canvas
"""
if event.num == 5 or event.delta == -120 or event.delta == -1:
if event.num == 5 or event.delta < 0:
v = 1
if event.num == 4 or event.delta == 120 or event.delta == 1:
if event.num == 4 or event.delta > 0:
v = -1
edit_canvas.yview_scroll(v, "units")

Expand Down

0 comments on commit a9d044e

Please sign in to comment.