aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2016-04-26 21:43:08 +0200
committerJean-Baptiste Mardelle <[email protected]>2016-04-26 21:43:08 +0200
commit9f630e16fbb34a652451066d96caafbc3bee19c6 (patch)
treed9d2ff33a274553454fdf1d0e33b1b3a05419b94
parentcf23802e536de7a4791a023bdf02616e2534f233 (diff)
Fix Extract corrupting clip keyframes
Ref: T1961
-rw-r--r--src/timeline/customtrackview.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/timeline/customtrackview.cpp b/src/timeline/customtrackview.cpp
index bc41c73..89d4b65 100644
--- a/src/timeline/customtrackview.cpp
+++ b/src/timeline/customtrackview.cpp
@@ -3201,20 +3201,25 @@ void CustomTrackView::extractZone(bool closeGap)
if (m_timeline->getTrackInfo(clip->track()).isLocked)
continue;
if (clip->startPos() < inPoint) {
- ItemInfo info = clip->info();
+ ItemInfo baseInfo = clip->info();
+ ItemInfo info = baseInfo;
info.startPos = inPoint;
- new RazorClipCommand(this, clip->info(), clip->effectList(), inPoint, true, command);
+ info.cropDuration = info.endPos - info.startPos;
if (clip->endPos() > outPoint) {
- new RazorClipCommand(this, info, clip->effectList(), outPoint, true, command);
+ new RazorClipCommand(this, baseInfo, clip->effectList(), outPoint, true, command);
info.cropDuration = outPoint - inPoint;
info.endPos = outPoint;
+ baseInfo.endPos = outPoint;
+ baseInfo.cropDuration = outPoint - baseInfo.startPos;
}
+ new RazorClipCommand(this, baseInfo, clip->effectList(), inPoint, true, command);
new AddTimelineClipCommand(this, clip->getBinId(), info, clip->effectList(), clip->clipState(), true, true, command);
} else if (clip->endPos() > outPoint) {
ItemInfo newclipInfo = clip->info();
- newclipInfo.startPos = outPoint;
+ new RazorClipCommand(this, newclipInfo, clip->effectList(), outPoint, true, command);
+ newclipInfo.endPos = outPoint;
newclipInfo.cropDuration = newclipInfo.endPos - newclipInfo.startPos;
- new ResizeClipCommand(this, clip->info(), newclipInfo, true, false, command);
+ new AddTimelineClipCommand(this, clip->getBinId(), newclipInfo, clip->effectList(), clip->clipState(), true, true, command);
} else {
// Clip is entirely inside zone, delete it
new AddTimelineClipCommand(this, clip->getBinId(), clip->info(), clip->effectList(), clip->clipState(), true, true, command);