Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2017-02-18 23:39:21 +0300
committerMike Erwin <significant.bit@gmail.com>2017-02-18 23:39:21 +0300
commitfae895125efe1b5c1c9b9280cd0597b9b3b40445 (patch)
tree7905fa82a369965a00d8a9073d46833b514782f5 /source/blender/editors/space_sequencer/sequencer_draw.c
parentab6993811f42f93f84113477c6e9866acd19dcc1 (diff)
fix OpenGL line count in VSE backdrop
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index cd2bdbd2891..d13d2be068b 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1513,7 +1513,7 @@ static void draw_seq_backdrop(View2D *v2d)
i = max_ii(1, ((int)v2d->cur.ymin) - 1);
while (i < v2d->cur.ymax) {
- if (((int)i) & 1) {
+ if (i & 1) {
immUniformThemeColorShade(TH_BACK, -15);
}
else {
@@ -1527,14 +1527,12 @@ static void draw_seq_backdrop(View2D *v2d)
/* Darker lines separating the horizontal bands */
i = max_ii(1, ((int)v2d->cur.ymin) - 1);
+ int line_ct = (int)v2d->cur.ymax - i + 1;
immUniformThemeColor(TH_GRID);
-
- immBegin(GL_LINES, ((int)v2d->cur.ymax - i + 1) * 2);
- while (i < v2d->cur.ymax) {
+ immBegin(GL_LINES, line_ct * 2);
+ while (line_ct--) {
immVertex2f(pos, v2d->cur.xmax, i);
immVertex2f(pos, v2d->cur.xmin, i);
-
- i++;
}
immEnd();