[Bf-blender-cvs] [dc60fdd] master: Fix T49646: Switching from large to small image can get stuck zoom at max zoom distance.
Anthony Edlin
noreply at git.blender.org
Fri Oct 14 01:08:41 CEST 2016
Commit: dc60fdd671a8fc2ca54587772e20ab6412f654b7
Author: Anthony Edlin
Date: Fri Oct 14 00:54:05 2016 +0200
Branches: master
https://developer.blender.org/rBdc60fdd671a8fc2ca54587772e20ab6412f654b7
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
===================================================================
M source/blender/editors/space_clip/clip_ops.c
M source/blender/editors/space_image/image_ops.c
===================================================================
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index de8d760..9430ee6 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -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;
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index b4dd5c4..6ca738b 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -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;
More information about the Bf-blender-cvs
mailing list