]> git.sesse.net Git - kdenlive/commitdiff
Fix pan & zoom effect getting corrupted after group move:
authorTill Theato <root@ttill.de>
Sun, 29 Aug 2010 09:48:26 +0000 (09:48 +0000)
committerTill Theato <root@ttill.de>
Sun, 29 Aug 2010 09:48:26 +0000 (09:48 +0000)
http://kdenlive.org/mantis/view.php?id=1776

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

src/clipitem.cpp
src/customtrackview.cpp
src/effectslistwidget.cpp
src/renderer.cpp

index 7a6d6bc17778561980313ccf24d2bc020618b49f..a210aa1a69a872fe0bd6f439cfea2b743d655e11 100644 (file)
@@ -1414,7 +1414,7 @@ EffectsParameterList ClipItem::addEffect(const QDomElement effect, bool /*animat
     if (effectId.isEmpty()) effectId = effect.attribute("tag");
     parameters.addParam("id", effectId);
 
-    // special case: the affine effect need in / out points
+    // special case: the affine effect needs in / out points
     if (effectId == "pan_zoom") {
         int start = cropStart().frames(m_fps);
         int end = (cropStart() + cropDuration()).frames(m_fps);
index cdc95a0949530ef0e259daf90398b68707d54045..4fe9be9dfc5540554e4b610b166b721d2bbda52d 100644 (file)
@@ -1713,9 +1713,13 @@ void CustomTrackView::slotAddEffect(QDomElement effect, GenTime pos, int track)
             if (item->isItemLocked()) {
                 continue;
             }
+
             if (effect.attribute("id") == "freeze" && m_cursorPos > item->startPos().frames(m_document->fps()) && m_cursorPos < item->endPos().frames(m_document->fps())) {
                 item->initEffect(effect, m_cursorPos - item->startPos().frames(m_document->fps()));
-            } else item->initEffect(effect);
+            } else {
+                item->initEffect(effect);
+            }
+
             if (effect.attribute("tag") == "ladspa") {
                 QString ladpsaFile = m_document->getLadspaFile();
                 initEffects::ladspaEffectFile(ladpsaFile, effect.attribute("ladspaid").toInt(), getLadspaParams(effect));
index 4192fc8295d495fae1c8007757cc10fc263b14a5..4f433cc29e11037a9b8567dc74eebbd4002923e8 100644 (file)
@@ -338,7 +338,6 @@ void EffectsListWidget::dragMoveEvent(QDragMoveEvent * event)
     if (event->mimeData()->hasText()) {
         event->acceptProposedAction();
     }
-    //}
 }
 
 //virtual
index 6f446fbb8c42150424d12c323a8def10652c001d..a964af7edc40836117fb616f79f89e58869e8d1c 100644 (file)
@@ -2534,6 +2534,9 @@ bool Render::mltAddEffect(Mlt::Service service, EffectsParameterList params, int
             delete[] value;
         }
 
+        if (params.paramValue("id") == "pan_zoom") {
+            filter->set_in_and_out(service.get_int("in"), service.get_int("out") + 1);
+        }
 
         // attach filter to the clip
         service.attach(*filter);