[Bf-blender-cvs] [1ed0d1971c0] soc-2021-vse-strip-thumbnails: Fix : Last thumb with error in crop values

Aditya Y Jeppu noreply at git.blender.org
Tue Aug 17 19:52:36 CEST 2021


Commit: 1ed0d1971c08bede70abb97c8ae264cacd718caf
Author: Aditya Y Jeppu
Date:   Tue Aug 17 23:20:18 2021 +0530
Branches: soc-2021-vse-strip-thumbnails
https://developer.blender.org/rB1ed0d1971c08bede70abb97c8ae264cacd718caf

Fix : Last thumb with error in crop values

===================================================================

M	source/blender/editors/space_sequencer/sequencer_draw.c

===================================================================

diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index dc76c273233..ec2ec22d24b 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1596,7 +1596,10 @@ static void draw_seq_strip_thumbnail(View2D *v2d,
 
     cropx_min = (cut_off / pixelx) / (zoom_y / pixely);
     cropx_max = ((x2 - x1) / pixelx) / (zoom_y / pixely);
-    BLI_rcti_init(&crop, (int)(cropx_min), (int)cropx_max + 1, 0, (int)(image_y)-1);
+    if (cropx_max == (x2 - x1)) {
+      cropx_max = cropx_max + 1;
+    }
+    BLI_rcti_init(&crop, (int)(cropx_min), (int)cropx_max, 0, (int)(image_y)-1);
 
     /* Get the image. */
     ibuf = SEQ_get_thumbnail(&context, seq, roundf(x1), &crop, clipped);



More information about the Bf-blender-cvs mailing list