fixed urgent bug that irreparably deleted sequences

This commit is contained in:
itsmattkc
2018-11-05 17:59:29 +11:00
parent 74df34cd76
commit e342294917
12 changed files with 104 additions and 56 deletions
+6 -1
View File
@@ -311,11 +311,14 @@ void Viewer::pause() {
// add it to the sequence
Clip* c = new Clip(seq);
Media* m = panel_project->last_imported_media.at(0);
m->ready_lock.lock();
c->media = m; // latest media
c->media_type = MEDIA_TYPE_FOOTAGE;
c->media_stream = 0;
c->timeline_in = recording_start;
c->timeline_out = seq->playhead;
c->timeline_out = m->get_length_in_frames(seq->frame_rate);
c->clip_in = 0;
c->track = recording_track;
c->color_r = 128;
@@ -323,6 +326,8 @@ void Viewer::pause() {
c->color_b = 128;
c->name = m->name;
m->ready_lock.unlock();
QVector<Clip*> add_clips;
add_clips.append(c);
undo_stack.push(new AddClipCommand(seq, add_clips)); // add clip