prepping for linked clip rewrite
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
#Olive Video Editor
|
||||
|
||||
Olive is a non-linear video editor for Windows, macOS, and Linux. Binaries are not available as of yet, but will be very soon. If you're building from source, you'll need Qt and FFmpeg (recommended versions are Qt 5.5 and FFmpeg 3.4.2).
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.6.2, 2018-06-24T07:08:29. -->
|
||||
<!-- Written by QtCreator 4.6.2, 2018-06-24T11:28:41. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
||||
@@ -41,6 +41,7 @@ void Sequence::delete_clip(int i) {
|
||||
|
||||
// finally remove from vector
|
||||
delete clips.at(i);
|
||||
// clips[i] = NULL;
|
||||
clips.removeAt(i);
|
||||
}
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ void TimelineWidget::mouseReleaseEvent(QMouseEvent *event) {
|
||||
QVector<Selection> delete_areas;
|
||||
for (int i=0;i<panel_timeline->ghosts.size();i++) {
|
||||
const Ghost& g = panel_timeline->ghosts.at(i);
|
||||
|
||||
if (g.old_in != g.in || g.old_out != g.out || g.track != g.old_track || g.clip_in != g.old_clip_in) {
|
||||
Clip* c = g.clip->copy();
|
||||
|
||||
c->timeline_in = g.in;
|
||||
@@ -263,11 +263,14 @@ void TimelineWidget::mouseReleaseEvent(QMouseEvent *event) {
|
||||
|
||||
copy_clips.append(c);
|
||||
}
|
||||
}
|
||||
if (copy_clips.size() > 0) {
|
||||
panel_timeline->delete_areas_and_relink(delete_areas);
|
||||
for (int i=0;i<copy_clips.size();i++) {
|
||||
// step 2 - delete anything that exists in area that clip is moving to
|
||||
sequence->add_clip(copy_clips.at(i));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// move clips
|
||||
// TODO can we do this better than 3 consecutive for loops?
|
||||
|
||||
Reference in New Issue
Block a user