+ if (m_geomPath && KdenliveSettings::onmonitoreffects_geometryshowpath()) {
+ m_scene->removeItem(m_geomPath);
+ m_geomPath->setPoints(m_geometry);
+ m_scene->addItem(m_geomPath);
+ }
+ slotPositionChanged(-1, false);
+ emit parameterChanged();
+}
+
+void GeometryWidget::slotResetNextKeyframes()
+{
+ // Delete keyframes after cursor pos
+ Mlt::GeometryItem item;
+ int pos = m_timePos->getValue();
+ while (!m_geometry->next_key(&item, pos)) {
+ m_geometry->remove(item.frame());
+ }
+
+ // Delete extra geometry keyframes too
+ for (int i = 0; i < m_extraGeometries.count(); ++i) {
+ Mlt::Geometry *geom = m_extraGeometries.at(i);
+ while (!geom->next_key(&item, pos)) {
+ geom->remove(item.frame());
+ }
+ }
+
+ // Make sure we have at least one keyframe
+ if (m_geometry->next_key(&item, 0)) {
+ item.frame(0);
+ item.x(0);
+ item.y(0);
+ item.w(m_monitor->render->frameRenderWidth());
+ item.h(m_monitor->render->renderHeight());
+ 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);
+ }
+ slotPositionChanged(-1, false);
+ emit parameterChanged();
+}
+
+void GeometryWidget::slotResetPreviousKeyframes()
+{
+ // Delete keyframes before cursor pos
+ Mlt::GeometryItem item;
+ int pos = 0;
+ while (!m_geometry->next_key(&item, pos) && pos < m_timePos->getValue()) {
+ pos = item.frame() + 1;
+ m_geometry->remove(item.frame());
+ }
+
+ // Delete extra geometry keyframes too
+ for (int i = 0; i < m_extraGeometries.count(); ++i) {
+ Mlt::Geometry *geom = m_extraGeometries.at(i);
+ pos = 0;
+ while (!geom->next_key(&item, pos) && pos < m_timePos->getValue()) {
+ pos = item.frame() + 1;
+ geom->remove(item.frame());
+ }
+ }
+
+ // Make sure we have at least one keyframe
+ if (!m_geometry->next_key(&item, 0)) {
+ item.frame(0);
+ /*item.x(0);
+ item.y(0);
+ item.w(m_monitor->render->frameRenderWidth());
+ item.h(m_monitor->render->renderHeight());
+ item.mix(100);*/
+ m_geometry->insert(item);
+ }
+ else {
+ item.frame(0);
+ item.x(0);
+ item.y(0);
+ item.w(m_monitor->render->frameRenderWidth());
+ item.h(m_monitor->render->renderHeight());
+ 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);