From: Jean-Baptiste Mardelle Date: Fri, 3 Sep 2010 08:32:05 +0000 (+0000) Subject: Fix issue with fade out and fade to black effects, might solve: X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d8702e10b55338ae1cfe51d186ae60c7a645ee78;p=kdenlive Fix issue with fade out and fade to black effects, might solve: http://www.kdenlive.org/mantis/view.php?id=1587 svn path=/trunk/kdenlive/; revision=4820 --- diff --git a/src/clipitem.cpp b/src/clipitem.cpp index 561ab7d0..c2cc1361 100644 --- a/src/clipitem.cpp +++ b/src/clipitem.cpp @@ -253,7 +253,7 @@ void ClipItem::initEffect(QDomElement effect, int diff) } if (effect.attribute("tag") == "volume" || effect.attribute("tag") == "brightness") { if (effect.attribute("id") == "fadeout" || effect.attribute("id") == "fade_to_black") { - int end = (cropDuration() + cropStart()).frames(m_fps); + int end = (cropDuration() + cropStart()).frames(m_fps) - 1; int start = end; if (effect.attribute("id") == "fadeout") { if (m_effectList.hasEffect(QString(), "fade_to_black") == -1) { diff --git a/src/effectstackedit.cpp b/src/effectstackedit.cpp index e9ec1398..fc979af8 100644 --- a/src/effectstackedit.cpp +++ b/src/effectstackedit.cpp @@ -312,9 +312,9 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int pos, int in, in pos = pos - m_in; } else if (d.attribute("id") == "fadeout" || d.attribute("id") == "fade_to_black") { // fadeout position starts from clip end - pos = m_out - (pos - m_in); + pos = m_out - pos; } - PositionEdit *posedit = new PositionEdit(paramName, pos, 1, m_out - m_in, m_timecode); + PositionEdit *posedit = new PositionEdit(paramName, pos, 0, m_out - m_in, m_timecode); m_vbox->addWidget(posedit); m_valueItems[paramName+"position"] = posedit; connect(posedit, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters())); @@ -580,8 +580,8 @@ void EffectStackEdit::collectAllParameters() pos = m_out; pedit->setPosition(pos); }*/ - EffectsList::setParameter(newparam, "in", QString::number(m_out + m_in - pos)); - EffectsList::setParameter(newparam, "out", QString::number(m_out + m_in)); + EffectsList::setParameter(newparam, "in", QString::number(m_out - pos)); + EffectsList::setParameter(newparam, "out", QString::number(m_out)); setValue.clear(); } } else if (type == "curve") { diff --git a/src/effectstackview.cpp b/src/effectstackview.cpp index d0f28ac4..855ed3ca 100644 --- a/src/effectstackview.cpp +++ b/src/effectstackview.cpp @@ -310,7 +310,7 @@ void EffectStackView::slotItemSelectionChanged(bool update) } else m_effectedit->transferParamDesc(eff, 0, m_clipref->cropStart().frames(KdenliveSettings::project_fps()), - (m_clipref->cropStart() + m_clipref->cropDuration()).frames(KdenliveSettings::project_fps())); //minx max frame + (m_clipref->cropStart() + m_clipref->cropDuration()).frames(KdenliveSettings::project_fps()) - 1); //minx max frame //m_ui.region_url->setUrl(KUrl(eff.attribute("region"))); } if (!m_trackMode && m_clipref && update) m_clipref->setSelectedEffect(activeRow); diff --git a/src/positionedit.cpp b/src/positionedit.cpp index 44d800f0..19ccb857 100644 --- a/src/positionedit.cpp +++ b/src/positionedit.cpp @@ -68,7 +68,6 @@ int PositionEdit::getPosition() const void PositionEdit::setPosition(int pos) { m_slider->setValue(pos); - m_display->setValue(pos); }