Skip to content

Commit

Permalink
Scaling factor is now correctly calculated when loading a new image t…
Browse files Browse the repository at this point in the history
…o exactly fit to the canvas
  • Loading branch information
Steffenhir committed Mar 29, 2024
1 parent 1ab60b4 commit 5d09eaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graxpert/ui/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ def show_progress_frame(self, show):
self.update()

def zoom_fit(self, image_width, image_height):
canvas_width = self.winfo_width()
canvas_height = self.winfo_height()
canvas_width = self.canvas.winfo_width()
canvas_height = self.canvas.winfo_height()

if (image_width * image_height <= 0) or (canvas_width * canvas_height <= 0):
return
Expand Down

0 comments on commit 5d09eaa

Please sign in to comment.