]> git.sesse.net Git - kdenlive/blobdiff - src/geometryval.cpp
Draw handles in the monitor scene when we are on a keyframe, helps to see when we...
[kdenlive] / src / geometryval.cpp
index 4c7e608ee7c63dd53540a7e3a59cfada14072793..45f0f206735e040d91718c815ec27d7ad56ec051 100644 (file)
@@ -26,6 +26,7 @@
 #include <QGraphicsRectItem>
 #include <QMenu>
 #include <QInputDialog>
+#include <QTimer>
 
 
 Geometryval::Geometryval(const MltVideoProfile profile, Timecode t, QPoint frame_size, int startPoint, QWidget* parent) :
@@ -252,7 +253,6 @@ void Geometryval::slotPositionChanged(int pos, bool seek)
     if (pos == -1) {
         pos = m_timePos.getValue();
     }
-    kDebug() << "// POS CHANGED: " << pos << ", SEK: " << seek;
     if (seek && KdenliveSettings::transitionfollowcursor()) emit seekToPos(pos + m_startPoint);
     m_timePos.setValue(pos);
     //spinPos->setValue(pos);
@@ -424,6 +424,16 @@ void Geometryval::setupParam(const QDomElement par, int minFrame, int maxFrame)
     connect(spinTransp, SIGNAL(valueChanged(int)), this , SLOT(slotTransparencyChanged(int)));
 }
 
+void Geometryval::slotSyncPosition(int relTimelinePos)
+{
+    if (m_timePos.maximum() > 0 && KdenliveSettings::transitionfollowcursor()) {
+        relTimelinePos = qMax(0, relTimelinePos);
+        relTimelinePos = qMin(relTimelinePos, m_timePos.maximum());
+        if (relTimelinePos != m_timePos.getValue())
+            slotPositionChanged(relTimelinePos, false);
+    }
+}
+
 void Geometryval::updateTransitionPath()
 {
     if (m_fixedMode) return;
@@ -489,6 +499,7 @@ void Geometryval::slotKeyframeMoved(int pos)
 {
     slotPositionChanged(pos);
     slotUpdateTransitionProperties();
+    QTimer::singleShot(100, this, SIGNAL(parameterChanged()));
 }
 
 void Geometryval::slotSwitchOptions()