aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2015-06-02 00:14:08 +0200
committerJean-Baptiste Mardelle <[email protected]>2015-06-02 00:14:08 +0200
commitd6a837966b86e6b12ce3062d62ce13d545d30741 (patch)
tree2773ff981051dd1d08774a366b53607f992b63af
parentbfecccb2771229d0dde05c0ae9e44ac2331ca318 (diff)
Several improvements to monitor overlay when editing a geometry transition
-rw-r--r--data/kdenlivemonitoreffectscene.qml36
-rw-r--r--src/effectstack/effectstackedit.cpp7
-rw-r--r--src/effectstack/effectstackedit.h4
-rw-r--r--src/effectstack/parametercontainer.cpp3
-rw-r--r--src/effectstack/parametercontainer.h2
-rw-r--r--src/effectstack/widgets/geometrywidget.cpp147
-rw-r--r--src/effectstack/widgets/geometrywidget.h6
-rw-r--r--src/monitor/monitor.cpp12
-rw-r--r--src/monitor/monitor.h2
-rw-r--r--src/project/transitionsettings.cpp1
10 files changed, 98 insertions, 122 deletions
diff --git a/data/kdenlivemonitoreffectscene.qml b/data/kdenlivemonitoreffectscene.qml
index eaba3bb..7cda68c 100644
--- a/data/kdenlivemonitoreffectscene.qml
+++ b/data/kdenlivemonitoreffectscene.qml
@@ -14,17 +14,27 @@ Item {
property double scale
onScaleChanged: canvas.requestPaint()
property bool iskeyframe
+ property int requestedKeyFrame
property var centerPoints: []
onCenterPointsChanged: canvas.requestPaint()
signal effectChanged()
signal addKeyframe()
+ signal seekToKeyframe()
+
+ Text {
+ id: fontReference
+ property int fontSize
+ fontSize: font.pointSize
+ }
Canvas {
id: canvas
+ property double handleSize
width: root.width
height: root.height
anchors.centerIn: root
contextType: "2d";
+ handleSize: fontReference.fontSize / 2
renderStrategy: Canvas.Threaded;
onPaint:
{
@@ -32,6 +42,7 @@ Item {
context.clearRect(0,0, width, height);
context.beginPath()
context.strokeStyle = Qt.rgba(1, 0, 0, 0.5)
+ context.fillStyle = Qt.rgba(1, 0, 0, 0.5)
context.lineWidth = 2
for(var i = 0; i < root.centerPoints.length; i++)
@@ -40,9 +51,11 @@ Item {
if(i == 0)
{
context.moveTo(p1.x, p1.y)
+ context.fillRect(p1.x - handleSize, p1.y - handleSize, 2 * handleSize, 2 * handleSize);
continue
}
context.lineTo(p1.x, p1.y)
+ context.fillRect(p1.x - handleSize, p1.y - handleSize, 2 * handleSize, 2 * handleSize);
}
context.stroke()
context.restore()
@@ -72,7 +85,26 @@ Item {
objectName: "global"
width: root.width; height: root.height
anchors.centerIn: root
+ hoverEnabled: true
+ cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
+
+ readonly property bool containsMouse: {
+ for(var i = 0; i < root.centerPoints.length; i++)
+ {
+ var p1 = canvas.convertPoint(root.centerPoints[i])
+ if (Math.abs(p1.x - mouseX) <= canvas.handleSize && Math.abs(p1.y - mouseY) <= canvas.handleSize) {
+ root.requestedKeyFrame = i
+ return true
+ }
+ }
+ root.requestedKeyFrame = -1
+ return false
+ }
+
onClicked: {
+ if (root.requestedKeyFrame >= 0) {
+ root.seekToKeyframe();
+ }
}
onDoubleClicked: {
@@ -81,7 +113,7 @@ Item {
}
Rectangle {
id: framerect
- property color hoverColor: "#ff0000"
+ property color hoverColor: "#ffffff"
x: frame.x + root.framesize.x * root.scale
y: frame.y + root.framesize.y * root.scale
width: root.framesize.width * root.scale
@@ -272,7 +304,7 @@ Item {
enabled: root.iskeyframe
cursorShape: root.iskeyframe ? Qt.SizeAllCursor : Qt.ArrowCursor
onEntered: { framerect.hoverColor = '#ffff00'}
- onExited: { framerect.hoverColor = '#ff0000'}
+ onExited: { framerect.hoverColor = '#ffffff'}
onPressed: {
oldMouseX = mouseX
oldMouseY = mouseY
diff --git a/src/effectstack/effectstackedit.cpp b/src/effectstack/effectstackedit.cpp
index 03d4da7..6fdd2be 100644
--- a/src/effectstack/effectstackedit.cpp
+++ b/src/effectstack/effectstackedit.cpp
@@ -158,6 +158,7 @@ void EffectStackEdit::transferParamDesc(const QDomElement &d, ItemInfo info, boo
connect(m_paramWidget, SIGNAL(startFilterJob(QMap<QString,QString>&, QMap<QString,QString>&,QMap <QString, QString>&)), this, SIGNAL(startFilterJob(QMap<QString,QString>&, QMap<QString,QString>&,QMap <QString, QString>&)));
connect (this, SIGNAL(syncEffectsPos(int)), m_paramWidget, SIGNAL(syncEffectsPos(int)));
+ connect (this, SIGNAL(initScene(int)), m_paramWidget, SIGNAL(initScene(int)));
connect (m_paramWidget, SIGNAL(checkMonitorPosition(int)), this, SIGNAL(checkMonitorPosition(int)));
connect (m_paramWidget, SIGNAL(seekTimeline(int)), this, SIGNAL(seekTimeline(int)));
connect (m_paramWidget, SIGNAL(importClipKeyframes()), this, SIGNAL(importClipKeyframes()));
@@ -181,6 +182,12 @@ void EffectStackEdit::slotSyncEffectsPos(int pos)
emit syncEffectsPos(pos);
}
+void EffectStackEdit::initEffectScene(int pos)
+{
+ emit initScene(pos);
+}
+
+
bool EffectStackEdit::needsMonitorEffectScene() const
{
if (!m_paramWidget) return false;
diff --git a/src/effectstack/effectstackedit.h b/src/effectstack/effectstackedit.h
index ad92f9a..6f47b1b 100644
--- a/src/effectstack/effectstackedit.h
+++ b/src/effectstack/effectstackedit.h
@@ -56,6 +56,8 @@ public:
/** @brief Set keyframes for this transition. */
void setKeyframes(const QString &data, int maximum);
void updatePalette();
+ /** @brief Emit geometry settings. */
+ void initEffectScene(int pos);
private:
EffectMetaInfo m_metaInfo;
@@ -75,6 +77,8 @@ signals:
void displayMessage(const QString&, int);
void checkMonitorPosition(int);
void syncEffectsPos(int pos);
+ /** @brief Request sending geometry info to monitor overlay. */
+ void initScene(int);
void showComments(bool show);
void effectStateChanged(bool enabled);
/** @brief Start an MLT filter job on this clip. */
diff --git a/src/effectstack/parametercontainer.cpp b/src/effectstack/parametercontainer.cpp
index 0cf3684..d6b9ac6 100644
--- a/src/effectstack/parametercontainer.cpp
+++ b/src/effectstack/parametercontainer.cpp
@@ -242,6 +242,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
connect(m_geometryWidget, SIGNAL(seekToPos(int)), this, SIGNAL(seekTimeline(int)));
connect(m_geometryWidget, SIGNAL(importClipKeyframes()), this, SIGNAL(importClipKeyframes()));
connect(this, SIGNAL(syncEffectsPos(int)), m_geometryWidget, SLOT(slotSyncPosition(int)));
+ connect(this, SIGNAL(initScene(int)), m_geometryWidget, SLOT(slotInitScene(int)));
} else {
Geometryval *geo = new Geometryval(m_metaInfo->monitor->profile(), m_metaInfo->timecode, m_metaInfo->frameSize, 0);
if (minFrame == maxFrame) {
@@ -600,7 +601,7 @@ void ParameterContainer::slotCollectAllParameters()
locale.setNumberOptions(QLocale::OmitGroupSeparator);
const QDomElement oldparam = m_effect.cloneNode().toElement();
//QDomElement newparam = oldparam.cloneNode().toElement();
-
+
if (m_effect.attribute("id") == "movit.lift_gamma_gain" || m_effect.attribute("id") == "lift_gamma_gain" ) {
LumaLiftGain *gainWidget = ((LumaLiftGain*)m_valueItems.value(m_effect.attribute("id")));
gainWidget->updateEffect(m_effect);
diff --git a/src/effectstack/parametercontainer.h b/src/effectstack/parametercontainer.h
index 69d2b4f..3ff0e0c 100644
--- a/src/effectstack/parametercontainer.h
+++ b/src/effectstack/parametercontainer.h
@@ -125,6 +125,8 @@ signals:
void importClipKeyframes();
/** @brief Master clip was resized, update effect. */
void updateRange(int inPoint, int outPoint);
+ /** @brief Request sending geometry info to monitor overlay. */
+ void initScene(int);
};
#endif
diff --git a/src/effectstack/widgets/geometrywidget.cpp b/src/effectstack/widgets/geometrywidget.cpp
index cb19c66..8312e25 100644
--- a/src/effectstack/widgets/geometrywidget.cpp
+++ b/src/effectstack/widgets/geometrywidget.cpp
@@ -45,13 +45,13 @@ GeometryWidget::GeometryWidget(Monitor* monitor, const Timecode &timecode, int c
m_clipPos(clipPos),
m_inPoint(0),
m_outPoint(1),
- m_geomPath(NULL),
m_previous(NULL),
m_geometry(NULL),
m_fixedGeom(false)
{
m_ui.setupUi(this);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
+ connect(m_monitor, SIGNAL(effectChanged(QRect)), this, SLOT(slotUpdateGeometry(QRect)));
/*MonitorEditWidget *edit = monitor->getEffectEdit();
edit->removeCustomControls();
edit->addCustomButton(QIcon::fromTheme("draw-path"), i18n("Show path"), this, SLOT(slotShowPath(bool)), true, KdenliveSettings::onmonitoreffects_geometryshowpath());
@@ -252,6 +252,7 @@ GeometryWidget::GeometryWidget(Monitor* monitor, const Timecode &timecode, int c
*/
connect(m_monitor, SIGNAL(addKeyframe()), this, SLOT(slotAddKeyframe()));
+ connect(m_monitor, SIGNAL(seekToKeyframe(int)), this, SLOT(slotSeekToKeyframe(int)));
connect(this, SIGNAL(parameterChanged()), this, SLOT(slotUpdateProperties()));
}
@@ -264,10 +265,6 @@ GeometryWidget::~GeometryWidget()
delete m_spinWidth;
delete m_spinHeight;
delete m_opacity;
- /*if (m_geomPath) {
- m_scene->removeItem(m_geomPath);
- delete m_geomPath;
- }*/
delete m_previous;
delete m_geometry;
m_extraGeometryNames.clear();
@@ -287,10 +284,6 @@ void GeometryWidget::slotShowPreviousKeyFrame(bool show)
void GeometryWidget::slotShowPath(bool show)
{
KdenliveSettings::setOnmonitoreffects_geometryshowpath(show);
- if (m_geomPath) {
- /*if (show) m_scene->addItem(m_geomPath);
- else m_scene->removeItem(m_geomPath);*/
- }
slotPositionChanged(-1, false);
}
@@ -328,7 +321,6 @@ void GeometryWidget::setupParam(const QDomElement &elem, int minframe, int maxfr
{
m_inPoint = minframe;
m_outPoint = maxframe;
-
if (m_geometry)
m_geometry->parse(elem.attribute("value").toUtf8().data(), maxframe - minframe, m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
else
@@ -353,25 +345,8 @@ void GeometryWidget::setupParam(const QDomElement &elem, int minframe, int maxfr
Mlt::GeometryItem item;
m_geometry->fetch(&item, m_monitor->render->seekFramePosition() - m_clipPos);
- /*if (m_rect) {
- m_scene->removeItem(m_rect);
- delete m_rect;
- }*/
- /*if (m_geomPath) {
- m_scene->removeItem(m_geomPath);
- delete m_geomPath;
- }*/
-
m_monitor->slotShowEffectScene(true);
m_monitor->setUpEffectGeometry(QRect(item.x(), item.y(), item.w(), item.h()), calculateCenters());
- connect(m_monitor, SIGNAL(effectChanged(QRect)), this, SLOT(slotUpdateGeometry(QRect)));
- /*m_geomPath = new OnMonitorPathItem();
- connect(m_geomPath, SIGNAL(changed()), this, SLOT(slotUpdatePath()));
- m_geomPath->setPen(QPen(Qt::red));
- m_geomPath->setPoints(m_geometry);
- if (KdenliveSettings::onmonitoreffects_geometryshowpath())
- m_scene->addItem(m_geomPath);
- m_scene->centerView();*/
slotPositionChanged(m_monitor->render->seekFramePosition() - m_clipPos, false);
}
@@ -437,36 +412,6 @@ void GeometryWidget::slotPositionChanged(int pos, bool seek)
m_ui.buttonAddDelete->setIcon(QIcon::fromTheme("list-remove"));
m_ui.buttonAddDelete->setToolTip(i18n("Delete keyframe"));
}
-
- /*if (KdenliveSettings::onmonitoreffects_geometryshowprevious() == false || m_geometry->prev_key(&previousItem, pos - 1) || previousItem.frame() == item.frame()) {
- if (m_previous) {
- //m_scene->removeItem(m_previous);
- }
- }
- else if (m_previous && m_previous->scene() && m_previous->data(Qt::UserRole).toInt() == previousItem.frame()) {
- // previous frame already here, do nothing
- }
- else {
- if (m_previous == NULL) {
- m_previous = new QGraphicsRectItem(0, 0, previousItem.w(), previousItem.h());
- m_previous->setBrush(QColor(200, 200, 0, 20));
- m_previous->setPen(QPen(Qt::white, 0, Qt::DotLine));
- m_previous->setPos(previousItem.x(), previousItem.y());
- m_previous->setZValue(-1);
- m_previous->setEnabled(false);
- }
- else {
- m_previous->setPos(previousItem.x(), previousItem.y());
- m_previous->setRect(0, 0, previousItem.w(), previousItem.h());
- }
- m_previous->setData(Qt::UserRole, previousItem.frame());
- if (m_previous->scene() == 0) m_scene->addItem(m_previous);
- }
- */
-
- QRect r((int) item.x(), (int) item.y(), (int) item.w(), (int) item.h());
- m_monitor->setUpEffectGeometry(r);
-
m_opacity->blockSignals(true);
m_opacity->setValue(item.mix());
m_opacity->blockSignals(false);
@@ -483,13 +428,20 @@ void GeometryWidget::slotPositionChanged(int pos, bool seek)
}
}
}
-
+ m_geometry->fetch(&item, pos);
+ QRect r((int) item.x(), (int) item.y(), (int) item.w(), (int) item.h());
+ m_monitor->setUpEffectGeometry(r, calculateCenters());
slotUpdateProperties();
if (seek && KdenliveSettings::transitionfollowcursor())
emit seekToPos(pos);
}
+void GeometryWidget::slotInitScene(int pos)
+{
+ slotPositionChanged(pos, false);
+}
+
void GeometryWidget::slotKeyframeMoved(int pos)
{
slotPositionChanged(pos);
@@ -497,6 +449,20 @@ void GeometryWidget::slotKeyframeMoved(int pos)
QTimer::singleShot(100, this, SIGNAL(parameterChanged()));
}
+void GeometryWidget::slotSeekToKeyframe(int index)
+{
+ // "fixed" effect: don't allow keyframe (FIXME: find a better way to access this property!)
+ Mlt::GeometryItem item;
+ int pos = 0;
+ int ix = 0;
+ while (!m_geometry->next_key(&item, pos) && ix < index) {
+ ix++;
+ pos = item.frame() + 1;
+ }
+ slotPositionChanged(item.frame(), true);
+}
+
+
void GeometryWidget::slotAddKeyframe(int pos)
{
// "fixed" effect: don't allow keyframe (FIXME: find a better way to access this property!)
@@ -525,9 +491,10 @@ void GeometryWidget::slotAddKeyframe(int pos)
geom->insert(item2);
}
}
-
+
m_timeline->update();
slotPositionChanged(pos, false);
+ m_monitor->setUpEffectGeometry(QRect(item.x(), item.y(), item.w(), item.h()), calculateCenters());
emit parameterChanged();
}
@@ -549,11 +516,8 @@ void GeometryWidget::slotDeleteKeyframe(int pos)
}
m_timeline->update();
- if (m_geomPath && KdenliveSettings::onmonitoreffects_geometryshowpath()) {
- /*m_scene->removeItem(m_geomPath);
- m_geomPath->setPoints(m_geometry);
- m_scene->addItem(m_geomPath);*/
- }
+ m_geometry->fetch(&item, pos);
+ m_monitor->setUpEffectGeometry(QRect(item.x(), item.y(), item.w(), item.h()), calculateCenters());
slotPositionChanged(pos, false);
emit parameterChanged();
}
@@ -590,26 +554,6 @@ void GeometryWidget::slotAddDeleteKeyframe()
slotDeleteKeyframe();
}
-void GeometryWidget::slotUpdatePath()
-{
- if (!m_geomPath) return;
- QList <QPointF> points = m_geomPath->points();
- Mlt::GeometryItem item;
- int pos = 0;
- int ix = 0;
- while (ix < points.count() && !m_geometry->next_key(&item, pos)) {
- QPointF center = points.at(ix);
- QSizeF size(item.w(), item.h());
- item.x(center.x() - size.width()/2);
- item.y(center.y() - size.height()/2);
- m_geometry->insert(item);
- pos = item.frame() + 1;
- ix++;
- }
- slotPositionChanged(-1, false);
- emit parameterChanged();
-}
-
void GeometryWidget::slotUpdateGeometry()
{
@@ -641,11 +585,6 @@ void GeometryWidget::slotUpdateGeometry()
geom->insert(item2);
}
}
- if (m_geomPath && KdenliveSettings::onmonitoreffects_geometryshowpath()) {
- /*m_scene->removeItem(m_geomPath);
- m_geomPath->setPoints(m_geometry);
- m_scene->addItem(m_geomPath);*/
- }
emit parameterChanged();
}
@@ -680,14 +619,8 @@ void GeometryWidget::slotUpdateGeometry(const QRect r)
geom->insert(item2);
}
}
- /*if (m_geomPath && KdenliveSettings::onmonitoreffects_geometryshowpath()) {
- m_scene->removeItem(m_geomPath);
- m_geomPath->setPoints(m_geometry);
- m_scene->addItem(m_geomPath);
- }*/
m_monitor->setUpEffectGeometry(QRect(), calculateCenters());
emit parameterChanged();
-
}
void GeometryWidget::slotUpdateProperties()
@@ -894,11 +827,7 @@ void GeometryWidget::slotResetKeyframes()
item.mix(100);
m_geometry->insert(item);
m_timeline->setKeyGeometry(m_geometry, m_outPoint - m_inPoint);
- if (m_geomPath && KdenliveSettings::onmonitoreffects_geometryshowpath()) {
- /*m_scene->removeItem(m_geomPath);
- m_geomPath->setPoints(m_geometry);
- m_scene->addItem(m_geomPath);*/
- }
+ m_monitor->setUpEffectGeometry(QRect(item.x(), item.y(), item.w(), item.h()), calculateCenters());
slotPositionChanged(-1, false);
emit parameterChanged();
}
@@ -931,11 +860,7 @@ void GeometryWidget::slotResetNextKeyframes()
m_geometry->insert(item);
}
m_timeline->setKeyGeometry(m_geometry, m_outPoint - m_inPoint);
- if (m_geomPath && KdenliveSettings::onmonitoreffects_geometryshowpath()) {
- /*m_scene->removeItem(m_geomPath);
- m_geomPath->setPoints(m_geometry);
- m_scene->addItem(m_geomPath);*/
- }
+ m_monitor->setUpEffectGeometry(QRect(item.x(), item.y(), item.w(), item.h()), calculateCenters());
slotPositionChanged(-1, false);
emit parameterChanged();
}
@@ -980,11 +905,7 @@ void GeometryWidget::slotResetPreviousKeyframes()
m_geometry->insert(item);
}
m_timeline->setKeyGeometry(m_geometry, m_outPoint - m_inPoint);
- if (m_geomPath && KdenliveSettings::onmonitoreffects_geometryshowpath()) {
- /*m_scene->removeItem(m_geomPath);
- m_geomPath->setPoints(m_geometry);
- m_scene->addItem(m_geomPath);*/
- }
+ m_monitor->setUpEffectGeometry(QRect(item.x(), item.y(), item.w(), item.h()), calculateCenters());
slotPositionChanged(-1, false);
emit parameterChanged();
}
@@ -1036,11 +957,7 @@ void GeometryWidget::importKeyframes(const QString &data, int maximum)
m_geometry->insert(item);
}
m_timeline->setKeyGeometry(m_geometry, m_outPoint - m_inPoint);
- /*if (m_geomPath && KdenliveSettings::onmonitoreffects_geometryshowpath()) {
- m_scene->removeItem(m_geomPath);
- m_geomPath->setPoints(m_geometry);
- m_scene->addItem(m_geomPath);
- }*/
+ m_monitor->setUpEffectGeometry(QRect(item.x(), item.y(), item.w(), item.h()), calculateCenters());
slotPositionChanged(-1, false);
emit parameterChanged();
}
diff --git a/src/effectstack/widgets/geometrywidget.h b/src/effectstack/widgets/geometrywidget.h
index 306fed1..07f9ff8 100644
--- a/src/effectstack/widgets/geometrywidget.h
+++ b/src/effectstack/widgets/geometrywidget.h
@@ -71,6 +71,9 @@ public slots:
void slotResetNextKeyframes();
void slotResetPreviousKeyframes();
void slotUpdateRange(int inPoint, int outPoint);
+ /** @brief Send geometry info to the monitor. */
+ void slotInitScene(int pos);
+ void slotSeekToKeyframe(int index);
private:
Ui::GeometryWidget_UI m_ui;
@@ -82,7 +85,6 @@ private:
int m_inPoint;
/** Out point of the clip (crop from end). */
int m_outPoint;
- OnMonitorPathItem *m_geomPath;
QGraphicsRectItem *m_previous;
KeyframeHelper *m_timeline;
/** Stores the different settings in the MLT geometry format. */
@@ -132,8 +134,6 @@ private slots:
/** @brief Adds or deletes a keyframe depending on whether there is already a keyframe at the current position. */
void slotAddDeleteKeyframe();
- /** @brief Updates the Mlt::Geometry path object. */
- void slotUpdatePath();
/** @brief Updates the Mlt::Geometry object. */
void slotUpdateGeometry();
void slotUpdateGeometry(const QRect r);
diff --git a/src/monitor/monitor.cpp b/src/monitor/monitor.cpp
index 31143b2..e6727f5 100644
--- a/src/monitor/monitor.cpp
+++ b/src/monitor/monitor.cpp
@@ -1221,10 +1221,11 @@ void Monitor::slotEnableEffectScene(bool enable)
void Monitor::slotShowEffectScene(bool show, bool manuallyTriggered)
{
- if (show) {
+ if (show && !m_rootItem || m_rootItem->objectName() != "rooteffectscene") {
m_glMonitor->setSource(QUrl::fromLocalFile(QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("kdenlivemonitoreffectscene.qml"))));
m_rootItem = m_glMonitor->rootObject();
QObject::connect(m_rootItem, SIGNAL(addKeyframe()), this, SIGNAL(addKeyframe()), Qt::UniqueConnection);
+ QObject::connect(m_rootItem, SIGNAL(seekToKeyframe()), this, SLOT(slotSeekToKeyFrame()), Qt::UniqueConnection);
m_glMonitor->slotShowEffectScene();
}
else if (m_rootItem && m_rootItem->objectName() == "rooteffectscene") {
@@ -1232,6 +1233,15 @@ void Monitor::slotShowEffectScene(bool show, bool manuallyTriggered)
}
}
+void Monitor::slotSeekToKeyFrame()
+{
+ if (m_rootItem && m_rootItem->objectName() == "rooteffectscene") {
+ // Adjust splitter pos
+ int kfr = m_rootItem->property("requestedKeyFrame").toInt();
+ emit seekToKeyframe(kfr);
+ }
+}
+
void Monitor::setUpEffectGeometry(QRect r, QVariantList list)
{
if (!list.isEmpty()) {
diff --git a/src/monitor/monitor.h b/src/monitor/monitor.h
index bb4196b..9c67663 100644
--- a/src/monitor/monitor.h
+++ b/src/monitor/monitor.h
@@ -186,6 +186,7 @@ private slots:
void slotAdjustEffectCompare();
void slotShowMenu(const QPoint pos);
void slotForceSize(QAction *a);
+ void slotSeekToKeyFrame();
public slots:
void slotOpenFile(const QString &);
@@ -245,6 +246,7 @@ signals:
void extractZone(const QString &id);
void effectChanged(const QRect);
void addKeyframe();
+ void seekToKeyframe(int);
};
#endif
diff --git a/src/project/transitionsettings.cpp b/src/project/transitionsettings.cpp
index 2bb5d32..c701c48 100644
--- a/src/project/transitionsettings.cpp
+++ b/src/project/transitionsettings.cpp
@@ -254,6 +254,7 @@ void TransitionSettings::slotCheckMonitorPosition(int renderPos)
if (renderPos >= m_usedTransition->startPos().frames(KdenliveSettings::project_fps()) && renderPos < m_usedTransition->endPos().frames(KdenliveSettings::project_fps())) {
if (!m_effectEdit->monitor()->effectSceneDisplayed()) {
m_effectEdit->monitor()->slotShowEffectScene(true);
+ m_effectEdit->initEffectScene(renderPos - m_usedTransition->startPos().frames(KdenliveSettings::project_fps()));
}
} else {
m_effectEdit->monitor()->slotShowEffectScene(false);