]> git.sesse.net Git - kdenlive/commitdiff
Fix pan & zoom effect:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 15 Aug 2009 21:52:35 +0000 (21:52 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 15 Aug 2009 21:52:35 +0000 (21:52 +0000)
http://www.kdenlive.org/mantis/view.php?id=1086

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

src/effectstackedit.cpp
src/effectstackview.cpp
src/geometryval.cpp
src/geometryval.h

index 95171d436aa5a30453d0c917bc2f8b14c2282904..8e2ab3f20c6945207f2381c8af0f85a2bfc8db8a 100644 (file)
@@ -450,7 +450,7 @@ void EffectStackEdit::collectAllParameters()
             namenode.item(i) = complex->getParamDesc();
         } else if (type == "geometry") {
             Geometryval *geom = ((Geometryval*)m_valueItems.value(paramName));
-            namenode.item(i) = geom->getParamDesc();
+            namenode.item(i).toElement().setAttribute("value", geom->getValue());
         } else if (type == "position") {
             PositionEdit *pedit = ((PositionEdit*)m_valueItems.value(paramName));
             int pos = pedit->getPosition();
index c16d00410850a7eae4307aafe33a3265254daf20..bb6b32716d6af337ed23808d51e7a8c898c20e05 100644 (file)
@@ -20,6 +20,7 @@
 #include "effectslist.h"
 #include "clipitem.h"
 #include "mainwindow.h"
+#include "docclipbase.h"
 #include "kdenlivesettings.h"
 
 #include <KDebug>
@@ -138,8 +139,12 @@ void EffectStackView::slotClipItemSelected(ClipItem* c, int ix)
         if (ix == -1) ix = m_ui.effectlist->currentRow();
     } else {
         m_clipref = c;
-        if (c) ix = c->selectedEffectIndex();
-        else ix = 0;
+        if (c) {
+            ix = c->selectedEffectIndex();
+            QString size = c->baseClip()->getProperty("frame_size");
+            QPoint p(size.section('x', 0, 0).toInt(), size.section('x', 1, 1).toInt());
+            m_effectedit->setFrameSize(p);
+        } else ix = 0;
     }
     if (m_clipref == NULL) {
         m_ui.effectlist->blockSignals(true);
index 6b3323ddfad46c8d0f12289f9377cd0b712151a6..213d65fe29f2e1c4400b69051446845cea8e83a7 100644 (file)
@@ -420,16 +420,13 @@ void Geometryval::slotPreviousFrame()
 }
 
 
-QDomElement Geometryval::getParamDesc()
+QString Geometryval::getValue() const
 {
-    m_param.setAttribute("value", m_geom->serialise());
-    kDebug() << " / / UPDATING TRANSITION VALUE: " << m_param.attribute("value");
-    return m_param;
+    return m_geom->serialise();
 }
 
 void Geometryval::setupParam(const QDomElement par, int minFrame, int maxFrame)
 {
-    m_param = par;
     QString val = par.attribute("value");
     if (par.attribute("fixed") == "1") {
         m_fixedMode = true;
index 9cab925fda883028e7611a269acf1f682a3e14ae..4d478583cad74ee174ff796142cc7db18ec6905c 100644 (file)
@@ -43,13 +43,13 @@ public:
     explicit Geometryval(const MltVideoProfile profile, QPoint frame_size, QWidget* parent = 0);
     virtual ~Geometryval();
     QDomElement getParamDesc();
+    QString getValue() const;
     void setFrameSize(QPoint p);
 
 private:
     Ui::Geometryval m_ui;
     MltVideoProfile m_profile;
     GraphicsSceneRectMove *m_scene;
-    QDomElement m_param;
     QGraphicsRectItem *m_paramRect;
     Mlt::Geometry *m_geom;
     KeyframeHelper *m_helper;