forked from bartvdbraak/blender
Fix T49646: Switching from large to small image can get stuck zoom at max zoom distance.
Allow for zooming in at max zoom distance. Reviewed By: Severin Differential Revision: https://developer.blender.org/D2291
This commit is contained in:
parent
625b504b23
commit
dc60fdd671
@ -103,7 +103,7 @@ static void sclip_zoom_set(const bContext *C, float zoom, float location[2])
|
||||
width *= sc->zoom;
|
||||
height *= sc->zoom;
|
||||
|
||||
if ((width < 4) && (height < 4))
|
||||
if ((width < 4) && (height < 4) && sc->zoom < oldzoom)
|
||||
sc->zoom = oldzoom;
|
||||
else if (BLI_rcti_size_x(&ar->winrct) <= sc->zoom)
|
||||
sc->zoom = oldzoom;
|
||||
|
@ -122,7 +122,7 @@ static void sima_zoom_set(SpaceImage *sima, ARegion *ar, float zoom, const float
|
||||
width *= sima->zoom;
|
||||
height *= sima->zoom;
|
||||
|
||||
if ((width < 4) && (height < 4))
|
||||
if ((width < 4) && (height < 4) && sima->zoom < oldzoom)
|
||||
sima->zoom = oldzoom;
|
||||
else if (BLI_rcti_size_x(&ar->winrct) <= sima->zoom)
|
||||
sima->zoom = oldzoom;
|
||||
|
Loading…
Reference in New Issue
Block a user