diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-10-16 18:01:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-10-16 18:03:17 +0300 |
commit | a1b34c0d289184b201912f715e730f54943dd4de (patch) | |
tree | 0fe0b781c13b252378b045aa8244de9a05e0f7e2 /source/blender/editors/interface/view2d.c | |
parent | 1ec549886b95bb55a072843676f322da026c943e (diff) |
Fix T46510: VSE View-all crops out image
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r-- | source/blender/editors/interface/view2d.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index b366cf16179..9976f42a48a 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -472,7 +472,7 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas /* check if we should restore aspect ratio (if view size changed) */ if (v2d->keepzoom & V2D_KEEPASPECT) { bool do_x = false, do_y = false, do_cur /* , do_win */ /* UNUSED */; - float /* curRatio, */ /* UNUSED */ winRatio; + float curRatio, winRatio; /* when a window edge changes, the aspect ratio can't be used to * find which is the best new 'cur' rect. thats why it stores 'old' @@ -480,7 +480,7 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas if (winx != v2d->oldwinx) do_x = true; if (winy != v2d->oldwiny) do_y = true; - /* curRatio = height / width; */ /* UNUSED */ + curRatio = height / width; winRatio = winy / winx; /* both sizes change (area/region maximized) */ @@ -490,7 +490,7 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas if (fabsf(winx - v2d->oldwinx) > fabsf(winy - v2d->oldwiny)) do_y = false; else do_x = false; } - else if (winRatio > 1.0f) { + else if (winRatio > curRatio) { do_x = false; } else { |