if (pos == m_startFade) return;
int oldIn = m_startFade;
if (pos < 0) pos = 0;
- if (pos > m_cropDuration.frames(m_fps)) pos = (int)(m_cropDuration.frames(m_fps) / 2);
+ if (pos > m_cropDuration.frames(m_fps)) pos = (int)(m_cropDuration.frames(m_fps));
m_startFade = pos;
QRectF rect = boundingRect();
update(rect.x(), rect.y(), qMax(oldIn, pos), rect.height());
if (pos == m_endFade) return;
int oldOut = m_endFade;
if (pos < 0) pos = 0;
- if (pos > m_cropDuration.frames(m_fps)) pos = (int)(m_cropDuration.frames(m_fps) / 2);
+ if (pos > m_cropDuration.frames(m_fps)) pos = (int)(m_cropDuration.frames(m_fps));
m_endFade = pos;
QRectF rect = boundingRect();
update(rect.x() + rect.width() - qMax(oldOut, pos), rect.y(), qMax(oldOut, pos), rect.height());
if (effectPos == -1) return;
QDomElement oldeffect = item->effectAt(effectPos);
int start = item->cropStart().frames(m_document->fps());
+ int max = item->cropDuration().frames(m_document->fps());
+ if (end > max) {
+ item->setFadeIn(max);
+ end = item->fadeIn();
+ }
end += start;
EffectsList::setParameter(oldeffect, "in", QString::number(start));
EffectsList::setParameter(oldeffect, "out", QString::number(end));
if (effectPos == -1) return;
QDomElement oldeffect = item->effectAt(effectPos);
int end = (item->duration() - item->cropStart()).frames(m_document->fps());
+ int max = item->cropDuration().frames(m_document->fps());
+ if (end > max) {
+ item->setFadeOut(max);
+ start = item->fadeOut();
+ }
start = end - start;
EffectsList::setParameter(oldeffect, "in", QString::number(start));
EffectsList::setParameter(oldeffect, "out", QString::number(end));
int pos = m_timecode.getFrameCount(line->text(), KdenliveSettings::project_fps());
if (params.attribute("id") == "fadein") {
pos += m_in;
+ if (pos > m_out) {
+ pos = m_out;
+ line->setText(m_timecode.getTimecodeFromFrames(pos));
+ }
} else if (params.attribute("id") == "fadeout") {
pos = m_out - (pos - m_in);
+ if (pos > m_out - m_in) {
+ pos = m_out - m_in;
+ line->setText(m_timecode.getTimecodeFromFrames(pos));
+ }
}
setValue = QString::number(pos);
} else if (type == "wipe") {