double speed = item->speed();
newPos.startPos = cutTime;
newPos.endPos = info.endPos;
- if (speed == 1) newPos.cropStart = item->info().cropStart + (cutTime - info.startPos);
- else newPos.cropStart = item->info().cropStart + (cutTime - info.startPos) * speed;
+ newPos.cropStart = item->info().cropStart + (cutTime - info.startPos);
newPos.track = info.track;
+ newPos.cropDuration = GenTime((int)((newPos.endPos - newPos.startPos).frames(m_document->fps()) * speed), m_document->fps());
+ newPos.originalcropStart = GenTime((int)(newPos.cropStart .frames(m_document->fps()) * speed), m_document->fps());
+
+
ClipItem *dup = item->clone(newPos);
// remove unwanted effects (fade in) from 2nd part of cutted clip
int ix = dup->hasEffect(QString(), "fadein");
GenTime startPos;
/** endPos is the duration where the clip ends on the track */
GenTime endPos;
- /** cropStart is the position where the sub-clip starts, relative to the clip's 0 position. Doe not depend on speed */
+ /** originalcropStart is the position where the sub-clip starts, relative to the clip's 0 position. Doe not depend on speed */
GenTime originalcropStart;
- /** adjustedCropStart is the position where the sub-clip starts, depend on effects (speed,...) */
+ /** cropStart is the position where the sub-clip starts, depend on effects (speed,...) */
GenTime cropStart;
- /** cropDuration is the position where the sub-clip ends, relative to the clip's 0 position. Doe not depend on speed */
+ /** cropDuration is the duration of the clip, does not depend on speed */
GenTime cropDuration;
int track;
};