diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c index c215a256b4e..8a6e80d5f01 100644 --- a/source/blender/src/drawseq.c +++ b/source/blender/src/drawseq.c @@ -823,7 +823,15 @@ void drawseqspace(ScrArea *sa, void *spacedata) if(ed) { seq= ed->seqbasep->first; while(seq) { - if(seq->flag & SELECT); else drawseq(seq); + if (seq->flag & SELECT || + seq->start > G.v2d->cur.xmax || + seq->start+seq->len < G.v2d->cur.xmin || + seq->machine+1.0 < G.v2d->cur.ymin || seq->machine > G.v2d->cur.ymax) + { + /* do nothing */ + } else { + drawseq(seq); + } seq= seq->next; } } @@ -831,7 +839,16 @@ void drawseqspace(ScrArea *sa, void *spacedata) if(ed) { seq= ed->seqbasep->first; while(seq) { - if(seq->flag & SELECT) drawseq(seq); + if (!(seq->flag & SELECT) || + seq->start > G.v2d->cur.xmax || + seq->start+seq->len < G.v2d->cur.xmin || + seq->machine+1.0 < G.v2d->cur.ymin || + seq->machine > G.v2d->cur.ymax) + { + /* do nothing */ + } else { + drawseq(seq); + } seq= seq->next; } }