svn merge ^/trunk/blender -r50091:50107
[blender.git] / source / blender / editors / space_sequencer / sequencer_edit.c
index cdd135b0755b1cc4d881284da69ca5242fc4e0a4..41535915c05462c0e6a4f36227b4354c6334272a 100644 (file)
@@ -2246,7 +2246,7 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
                ymax += ymargin;
                ymin -= ymargin;
 
-               orig_height = cur_new.ymax - cur_new.ymin;
+               orig_height = BLI_RCT_SIZE_Y(&cur_new);
 
                cur_new.xmin = xmin;
                cur_new.xmax = xmax;
@@ -2255,7 +2255,7 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
                cur_new.ymax = ymax;
 
                /* only zoom out vertically */
-               if (orig_height > cur_new.ymax - cur_new.ymin) {
+               if (orig_height > BLI_RCT_SIZE_Y(&cur_new)) {
                        ymid = BLI_RCT_CENTER_Y(&cur_new);
 
                        cur_new.ymin = ymid - (orig_height / 2);