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:
authorPeter Schlaile <peter@schlaile.de>2008-03-21 13:54:40 +0300
committerPeter Schlaile <peter@schlaile.de>2008-03-21 13:54:40 +0300
commit76adde8d19cbdf046048d49d40bd530e9440f842 (patch)
tree8f5ffc7e8a6c1d682f6597f3bf797b9ebfdd6d41
parent217401b593b860212aa05121f3bc9d8eca10dc00 (diff)
== Sequencer ==
Forgot REDRAW in obscure cases...
-rw-r--r--source/blender/src/editseq.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/src/editseq.c b/source/blender/src/editseq.c
index 2b583a7b7d4..d40d76785b4 100644
--- a/source/blender/src/editseq.c
+++ b/source/blender/src/editseq.c
@@ -2374,8 +2374,9 @@ static Sequence * cut_seq(Sequence * seq, int cutframe)
/* like duplicate, but only duplicate and cut overlapping strips,
* strips to the left of the cutframe are ignored and strips to the right are moved into the new list */
-static void cut_seq_list(ListBase *old, ListBase *new, int cutframe)
+static int cut_seq_list(ListBase *old, ListBase *new, int cutframe)
{
+ int did_something = FALSE;
Sequence *seq, *seq_next;
seq= old->first;
@@ -2391,6 +2392,7 @@ static void cut_seq_list(ListBase *old, ListBase *new, int cutframe)
if (seqn) {
BLI_addtail(new, seqn);
}
+ did_something = TRUE;
} else if (seq->enddisp <= cutframe) {
/* do nothing */
} else if (seq->startdisp >= cutframe) {
@@ -2401,6 +2403,7 @@ static void cut_seq_list(ListBase *old, ListBase *new, int cutframe)
}
seq = seq_next;
}
+ return did_something;
}
void seq_cut(int cutframe)
@@ -2408,14 +2411,16 @@ void seq_cut(int cutframe)
Editing *ed;
ListBase newlist;
char side;
+ int did_something;
+
ed= G.scene->ed;
if(ed==0) return;
newlist.first= newlist.last= NULL;
- cut_seq_list(ed->seqbasep, &newlist, cutframe);
+ did_something = cut_seq_list(ed->seqbasep, &newlist, cutframe);
- if (newlist.first) { /* simple check to see if anything was done */
+ if (newlist.first) { /* got new strips ? */
Sequence *seq;
addlisttolist(ed->seqbasep, &newlist);
@@ -2438,7 +2443,8 @@ void seq_cut(int cutframe)
/* as last: */
sort_seq();
-
+ }
+ if (did_something) {
allqueue(REDRAWSEQ, 0);
BIF_undo_push("Cut Strips, Sequencer");
}