From f44cf3733713b73d14defc6e43855c6316fd68e1 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sun, 30 Dec 2018 22:29:16 +1100 Subject: [PATCH] one last ripple bug (and transition bug) --- project/sequence.cpp | 18 +++++++++--------- ui/timelinewidget.cpp | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/project/sequence.cpp b/project/sequence.cpp index 7637fbd16..c65c2e1c5 100644 --- a/project/sequence.cpp +++ b/project/sequence.cpp @@ -58,16 +58,16 @@ void Sequence::hard_delete_transition(Clip *c, int type) { int transition_index = (type == TA_OPENING_TRANSITION) ? c->opening_transition : c->closing_transition; if (transition_index > -1) { bool del = true; - for (int i=0;iopening_transition == transition_index - || cc->closing_transition == transition_index)) { - // another clip is using this, don't delete just yet - del = false; - break; + + Transition* t = transitions.at(transition_index); + if (t->secondary_clip != NULL) { + if (type == TA_OPENING_TRANSITION) { + // convert to closing transition + t->parent_clip = t->secondary_clip; } + + del = false; + t->secondary_clip = NULL; } if (del) { diff --git a/ui/timelinewidget.cpp b/ui/timelinewidget.cpp index bebf82c2f..734487b45 100644 --- a/ui/timelinewidget.cpp +++ b/ui/timelinewidget.cpp @@ -1834,8 +1834,8 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) { for (int j=0;jtrack == c->track) { - if ((panel_timeline->trim_in_point && compare->timeline_out < c->timeline_out) - || (!panel_timeline->trim_in_point && compare->timeline_in > c->timeline_in)) { + if ((!clip_is_post && compare->timeline_out < c->timeline_out) + || (clip_is_post && compare->timeline_in > c->timeline_in)) { clip_list[j] = c; } found = true;