bugfix [#23155] Metastrip contents area allowed to move vertically, occasionally swapping order or overlapping

overlapping tests cant be done recursively
This commit is contained in:
Campbell Barton 2010-10-29 19:40:45 +00:00
parent f921f91454
commit 719c941c58

@ -1159,8 +1159,9 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op)
} }
SEQ_END SEQ_END
/* test for effects and overlap */ /* test for effects and overlap
SEQP_BEGIN(ed, seq) { * dont use SEQP_BEGIN since that would be recursive */
for(seq= ed->seqbasep->first; seq; seq= seq->next) {
if(seq->flag & SELECT && !(seq->depth==0 && seq->flag & SEQ_LOCK)) { if(seq->flag & SELECT && !(seq->depth==0 && seq->flag & SEQ_LOCK)) {
seq->flag &= ~SEQ_OVERLAP; seq->flag &= ~SEQ_OVERLAP;
if( seq_test_overlap(ed->seqbasep, seq) ) { if( seq_test_overlap(ed->seqbasep, seq) ) {
@ -1176,7 +1177,6 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op)
calc_sequence(scene, seq); calc_sequence(scene, seq);
} }
} }
SEQ_END;
/* as last: */ /* as last: */
sort_seq(scene); sort_seq(scene);
@ -2008,16 +2008,16 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op))
recurs_del_seq_flag(scene, ed->seqbasep, SEQ_FLAG_DELETE, 0); recurs_del_seq_flag(scene, ed->seqbasep, SEQ_FLAG_DELETE, 0);
/* test for effects and overlap */ /* test for effects and overlap
SEQP_BEGIN(ed, seq) { * dont use SEQP_BEGIN since that would be recursive */
for(seq= ed->seqbasep->first; seq; seq= seq->next) {
if(seq->flag & SELECT) { if(seq->flag & SELECT) {
seq->flag &= ~SEQ_OVERLAP; seq->flag &= ~SEQ_OVERLAP;
if( seq_test_overlap(ed->seqbasep, seq) ) { if(seq_test_overlap(ed->seqbasep, seq)) {
shuffle_seq(ed->seqbasep, seq, scene); shuffle_seq(ed->seqbasep, seq, scene);
} }
} }
} }
SEQ_END;
sort_seq(scene); sort_seq(scene);
seq_update_muting(scene, ed); seq_update_muting(scene, ed);