Fix: zoom-in when selection is out of sight

This commit is contained in:
Killy 2020-05-02 01:52:05 +03:00
commit 79ea558dbb

View file

@ -1590,10 +1590,11 @@ namespace Greenshot {
var size = surface.Size;
if (value > Surface.ZoomFactor) // being smart on zoom-in
{
var sel = surface.GetSelectionRectangle();
if (sel != Rectangle.Empty)
var selection = surface.GetSelectionRectangle();
selection.Intersect(rc);
if (selection != Rectangle.Empty)
{
rc.Intersect(sel); // zoom to visible part of selection
rc = selection; // zoom to visible part of selection
}
else
{