Skip to content

Commit

Permalink
BUG: zoom outside picture
Browse files Browse the repository at this point in the history
  • Loading branch information
gamaanderson committed Jun 2, 2016
1 parent c72ed25 commit ba46b52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions artview/components/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ def onZoom(self, event):
xdata = event.xdata # get event x location
ydata = event.ydata # get event y location

if (xdata is None) or (ydata is None):
return

if event.button == 'down':
# deal with zoom in
scale_factor = 1 / self.base_scale
Expand Down

0 comments on commit ba46b52

Please sign in to comment.