From 07bff6014afdc55381314a99815470579dce8ce8 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sat, 17 Nov 2018 09:20:48 +1100 Subject: [PATCH] fixed insert bug --- mainwindow.ui | 3 +++ ui/timelineheader.cpp | 2 -- ui/timelinewidget.cpp | 26 ++++++++++++++++++-------- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/mainwindow.ui b/mainwindow.ui index f1e28f591..499e6d1f3 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -218,6 +218,9 @@ Save Project &As + + Ctrl+Shift+S + diff --git a/ui/timelineheader.cpp b/ui/timelineheader.cpp index ce09a6fd5..8e05dd940 100644 --- a/ui/timelineheader.cpp +++ b/ui/timelineheader.cpp @@ -83,8 +83,6 @@ void TimelineHeader::set_out_point(long new_out) { new_in = 0; } - dout << new_in << new_out; - undo_stack.push(new SetTimelineInOutCommand(viewer->seq, true, new_in, new_out)); update_parents(); } diff --git a/ui/timelinewidget.cpp b/ui/timelinewidget.cpp index bfef743df..c0365289d 100644 --- a/ui/timelinewidget.cpp +++ b/ui/timelinewidget.cpp @@ -405,14 +405,24 @@ void insert_clips(ComboAction* ca) { for (int i=0;iclips.size();i++) { Clip* c = sequence->clips.at(i); if (c != NULL) { - if (c->timeline_in < earliest_new_point && c->timeline_out > earliest_new_point) { - panel_timeline->split_clip_and_relink(ca, i, earliest_new_point, true); - } - if (ripple_old_point - && !((c->timeline_in < earliest_old_point && c->timeline_out <= earliest_old_point) || (c->timeline_in >= latest_old_point && c->timeline_out > latest_old_point)) - && !ignore_clips.contains(c)) { - ripple_old_point = false; - } + // don't split any clips that are moving + bool found = false; + for (int j=0;jghosts.size();j++) { + if (panel_timeline->ghosts.at(j).clip == i) { + found = true; + break; + } + } + if (!found) { + if (c->timeline_in < earliest_new_point && c->timeline_out > earliest_new_point) { + panel_timeline->split_clip_and_relink(ca, i, earliest_new_point, true); + } + if (ripple_old_point + && !((c->timeline_in < earliest_old_point && c->timeline_out <= earliest_old_point) || (c->timeline_in >= latest_old_point && c->timeline_out > latest_old_point)) + && !ignore_clips.contains(c)) { + ripple_old_point = false; + } + } } }