From: Jean-Baptiste Mardelle Date: Sat, 15 Aug 2009 21:52:35 +0000 (+0000) Subject: Fix pan & zoom effect: X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=83331b13ce7d281686f88d1b411e2968f298affd;p=kdenlive Fix pan & zoom effect: http://www.kdenlive.org/mantis/view.php?id=1086 svn path=/trunk/kdenlive/; revision=3821 --- diff --git a/src/effectstackedit.cpp b/src/effectstackedit.cpp index 95171d43..8e2ab3f2 100644 --- a/src/effectstackedit.cpp +++ b/src/effectstackedit.cpp @@ -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(); diff --git a/src/effectstackview.cpp b/src/effectstackview.cpp index c16d0041..bb6b3271 100644 --- a/src/effectstackview.cpp +++ b/src/effectstackview.cpp @@ -20,6 +20,7 @@ #include "effectslist.h" #include "clipitem.h" #include "mainwindow.h" +#include "docclipbase.h" #include "kdenlivesettings.h" #include @@ -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); diff --git a/src/geometryval.cpp b/src/geometryval.cpp index 6b3323dd..213d65fe 100644 --- a/src/geometryval.cpp +++ b/src/geometryval.cpp @@ -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; diff --git a/src/geometryval.h b/src/geometryval.h index 9cab925f..4d478583 100644 --- a/src/geometryval.h +++ b/src/geometryval.h @@ -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;