fixed insert bug

This commit is contained in:
itsmattkc
2018-11-17 09:20:48 +11:00
parent 0468b0619a
commit 07bff6014a
3 changed files with 21 additions and 10 deletions
+3
View File
@@ -218,6 +218,9 @@
<property name="text">
<string>Save Project &amp;As</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+S</string>
</property>
</action>
<action name="action_Import">
<property name="text">
-2
View File
@@ -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();
}
+18 -8
View File
@@ -405,14 +405,24 @@ void insert_clips(ComboAction* ca) {
for (int i=0;i<sequence->clips.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;j<panel_timeline->ghosts.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;
}
}
}
}