if (durationDiff == GenTime()) return;
//kDebug() << "-- RESCALE DIFF=" << durationDiff.frames(25) << ", CLIP: " << startPos().frames(25) << "-" << endPos().frames(25);
- if (type() == AVWIDGET && hasSizeLimit && cropStart() + durationDiff < GenTime()) {
- durationDiff = GenTime() - cropStart();
+ if (type() == AVWIDGET && hasSizeLimit && (cropStart() + durationDiff < GenTime())) {
+ durationDiff = GenTime() - cropStart();
} else if (durationDiff >= cropDuration()) {
return;
if (cropDuration() > GenTime(3, m_fps)) durationDiff = GenTime(3, m_fps);
else return;
}
- //kDebug()<<"// DURATION DIFF: "<<durationDiff.frames(25)<<", POS: "<<pos().x();
m_info.startPos += durationDiff;
if (type() == AVWIDGET)
moveBy(durationDiff.frames(m_fps), 0);
if (m_info.startPos != GenTime(posx, m_fps)) {
- //kDebug()<<"////// WARNING, DIFF IN XPOS: "<<pos().x()<<" == "<<m_startPos.frames(m_fps);
+ //kDebug() << "////// WARNING, DIFF IN XPOS: " << pos().x() << " == " << m_info.startPos.frames(m_fps);
GenTime diff = m_info.startPos - GenTime(posx, m_fps);
if (type() == AVWIDGET)
int newpos = (int) pos.frames(m_fps);
int start = cropStart().frames(m_fps);
int end = (cropStart() + cropDuration()).frames(m_fps) - 1;
+ if (editedKeyFramePos() > start && newpos <= start) newpos = start + 1;
+ if (editedKeyFramePos() < end && newpos >= end) newpos = end - 1;
newpos = qMax(newpos, start);
newpos = qMin(newpos, end);
val = (br.bottom() - val) * maxh;
int start = item->cropStart().frames(m_document->fps());
int end = (item->cropStart() + item->cropDuration()).frames(m_document->fps()) - 1;
+
if ((val < -50 || val > 150) && item->editedKeyFramePos() != start && item->editedKeyFramePos() != end) {
//delete keyframe
- kDebug() << "// DELETE KFR: " << item->editedKeyFramePos();
item->movedKeyframe(item->getEffectAt(item->selectedEffectIndex()), item->selectedKeyFramePos(), -1, 0);
} else item->movedKeyframe(item->getEffectAt(item->selectedEffectIndex()), item->selectedKeyFramePos(), item->editedKeyFramePos(), item->editedKeyFrameValue());
+
QDomElement newEffect = item->selectedEffect().cloneNode().toElement();
//item->updateKeyframeEffect();
//QString next = item->keyframes(item->selectedEffectIndex());
QDomElement oldeffect = item->effectAt(effectPos);
int start = item->cropStart().frames(m_document->fps());
int max = start + item->cropDuration().frames(m_document->fps());
- if (start < 0) {
- max -= start;
- start = 0;
- }
+ if (start < 0) {
+ max -= start;
+ start = 0;
+ }
oldeffect.setAttribute("in", start);
oldeffect.setAttribute("out", max);
if (!m_document->renderer()->mltEditEffect(m_document->tracksCount() - item->track(), item->startPos(), item->getEffectArgs(oldeffect)))