]> git.sesse.net Git - kdenlive/commitdiff
Fix issue with fade out and fade to black effects, might solve:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 3 Sep 2010 08:32:05 +0000 (08:32 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 3 Sep 2010 08:32:05 +0000 (08:32 +0000)
http://www.kdenlive.org/mantis/view.php?id=1587

svn path=/trunk/kdenlive/; revision=4820

src/clipitem.cpp
src/effectstackedit.cpp
src/effectstackview.cpp
src/positionedit.cpp

index 561ab7d04166f4bd1f0788adcc779a52b660de1f..c2cc136169d78842fb5af6646bfef19dd80c5905 100644 (file)
@@ -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) {
index e9ec1398cfb89f792b95b8a129da160f398a6d82..fc979af8230492198315f635d7ab9032e4c3c6a3 100644 (file)
@@ -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") {
index d0f28ac4fac17a64b800e782fa4efa4981a03c1c..855ed3ca442158c017987b64bd205f30ee9f2025 100644 (file)
@@ -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);
index 44d800f05f60711702a8e94439793c2f3c0da37a..19ccb857d7c0c091cc7136fc316398b85ecc71b1 100644 (file)
@@ -68,7 +68,6 @@ int PositionEdit::getPosition() const
 void PositionEdit::setPosition(int pos)
 {
     m_slider->setValue(pos);
-    m_display->setValue(pos);
 }