]> git.sesse.net Git - kdenlive/blobdiff - src/effectstackedit.cpp
Add center-crop option to slideshow clip.
[kdenlive] / src / effectstackedit.cpp
index 4bf8b97152245c6a1c7ea015e6572736665de801..42e8a418939c547a60c00a45a432ee9c401b8dfa 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
-                          effecstackview.cpp  -  description
+                          effecstackedit.cpp  -  description
                              -------------------
     begin                : Feb 15 2008
     copyright            : (C) 2008 by Marco Gittler
@@ -145,10 +145,7 @@ void EffectStackEdit::meetDependency(const QString& name, QString type, QString
         KisCurveWidget *curve = (KisCurveWidget*)m_valueItems[name];
         if (curve) {
             int color = value.toInt();
-            if (color < 3)
-                curve->setPixmap(QPixmap::fromImage(ColorTools::rgbCurvePlane(curve->size(), (ColorTools::ColorsRGB)color)));
-            else
-                curve->setPixmap(QPixmap());
+            curve->setPixmap(QPixmap::fromImage(ColorTools::rgbCurvePlane(curve->size(), (ColorTools::ColorsRGB)color)));
         }
     }
 }
@@ -217,7 +214,8 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int pos, int in, in
             else
                 max = pa.attribute("max").toInt();
 
-            DoubleParameterWidget *doubleparam = new DoubleParameterWidget(paramName, (int)(value.toDouble() + 0.5), min, max, pa.attribute("suffix", QString()), this);
+            DoubleParameterWidget *doubleparam = new DoubleParameterWidget(paramName, (int)(value.toDouble() + 0.5), min, max,
+                                                                           pa.attribute("default").toInt(), pa.attribute("suffix"), this);
             m_vbox->addWidget(doubleparam);
             m_valueItems[paramName] = doubleparam;
             connect(doubleparam, SIGNAL(valueChanged(int)), this, SLOT(collectAllParameters()));
@@ -262,6 +260,8 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int pos, int in, in
         } else if (type == "geometry") {
             if (KdenliveSettings::on_monitor_effects()) {
                 GeometryWidget *geometry = new GeometryWidget(m_monitor, m_timecode, pos, isEffect, this);
+                // connect this before setupParam to make sure the monitor scene shows up at startup
+                connect(geometry, SIGNAL(checkMonitorPosition(int)), this, SIGNAL(checkMonitorPosition(int)));
                 if (minFrame == maxFrame)
                     geometry->setupParam(pa, m_in, m_out);
                 else
@@ -269,7 +269,6 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int pos, int in, in
                 m_vbox->addWidget(geometry);
                 m_valueItems[paramName+"geometry"] = geometry;
                 connect(geometry, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
-                connect(geometry, SIGNAL(checkMonitorPosition(int)), this, SIGNAL(checkMonitorPosition(int)));
                 connect(geometry, SIGNAL(seekToPos(int)), this, SIGNAL(seekTimeline(int)));
                 connect(this, SIGNAL(syncEffectsPos(int)), geometry, SLOT(slotSyncPosition(int)));
             } else {