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-07-23 11:11:23 +0400
committerPeter Schlaile <peter@schlaile.de>2008-07-23 11:11:23 +0400
commitab722cf7b1aa596867cbbcbc0940aec37dfc22bb (patch)
treea266b10b6b7dddb5de361fc582aa34887e386de0 /source/blender/src/editseq.c
parent1e7523ea4484131689cffe4cb782e0ff7b1823bc (diff)
== Sequencer ==
Fixes: [#17315] Sequencer: after undo there's no active object closes: [#17357] fix for bug #17315 - Sequencer: after undo there's no active object (kiemdoder: thanks for the patch, had to do it in a little bit different way, since sort_seq will kill your sort order idea...)
Diffstat (limited to 'source/blender/src/editseq.c')
-rw-r--r--source/blender/src/editseq.c34
1 files changed, 31 insertions, 3 deletions
diff --git a/source/blender/src/editseq.c b/source/blender/src/editseq.c
index f9432f8e69a..12019a9dab9 100644
--- a/source/blender/src/editseq.c
+++ b/source/blender/src/editseq.c
@@ -122,13 +122,28 @@ Sequence *get_last_seq()
if(!_last_seq_init) {
Editing *ed;
Sequence *seq;
+ Sequence *l_sel = NULL;
+ Sequence *l_act = NULL;
ed= G.scene->ed;
if(!ed) return NULL;
- for(seq= ed->seqbasep->first; seq; seq=seq->next)
+ for(seq= ed->seqbasep->first; seq; seq=seq->next) {
+ if(seq->flag & SEQ_ACTIVE)
+ l_act = seq;
if(seq->flag & SELECT)
- _last_seq= seq;
+ l_sel = seq;
+ }
+
+ if (l_act) {
+ _last_seq = l_act;
+ } else {
+ _last_seq = l_sel;
+ }
+
+ if (_last_seq) {
+ _last_seq->flag |= SEQ_ACTIVE;
+ }
_last_seq_init = 1;
}
@@ -138,12 +153,23 @@ Sequence *get_last_seq()
void set_last_seq(Sequence *seq)
{
+ if (_last_seq_init && _last_seq) {
+ _last_seq->flag &= ~SEQ_ACTIVE;
+ }
+
_last_seq = seq;
_last_seq_init = 1;
+
+ if (_last_seq) {
+ _last_seq->flag |= SEQ_ACTIVE;
+ }
}
-void clear_last_seq(Sequence *seq)
+void clear_last_seq()
{
+ if (_last_seq_init && _last_seq) {
+ _last_seq->flag &= ~SEQ_ACTIVE;
+ }
_last_seq = NULL;
_last_seq_init = 0;
}
@@ -2261,6 +2287,8 @@ static Sequence *dupli_seq(Sequence *seq)
"handled in duplicate!\nExpect a crash"
" now...\n");
}
+
+ seqn->flag &= ~SEQ_ACTIVE;
return seqn;
}