Skip to content

Commit

Permalink
Merge pull request PintaProject#77 from don-mccomb/LargeImageZoomIssue
Browse files Browse the repository at this point in the history
Prevented overflow when zooming in very far on large images
  • Loading branch information
cameronwhite committed Sep 6, 2014
2 parents b4be61f + 56c1cb4 commit 1fd0650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Pinta.Core/Classes/DocumentWorkspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public double Scale {
}

int new_x = Math.Max ((int)(document.ImageSize.Width * value), 1);
int new_y = Math.Max ((int)((new_x * document.ImageSize.Height) / document.ImageSize.Width), 1);
int new_y = Math.Max ((int)(((long)new_x * document.ImageSize.Height) / document.ImageSize.Width), 1);

CanvasSize = new Gdk.Size (new_x, new_y);
Invalidate ();
Expand Down

0 comments on commit 1fd0650

Please sign in to comment.