]> git.sesse.net Git - kdenlive/blobdiff - src/customtrackview.cpp
Ask to change profile if first clip does not match project profile:
[kdenlive] / src / customtrackview.cpp
index 5852bce01929945e3f9efdcc2cbc6e21a071a7c3..429ce27297751df61c296a5711d5485ad2772a05 100644 (file)
@@ -1793,7 +1793,7 @@ void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement insertedE
         return;
     }
     QDomElement effect = insertedEffect.cloneNode().toElement();
-    kDebug() << "// update effect ix: " << effect.attribute("kdenlive_ix");
+    //kDebug() << "// update effect ix: " << effect.attribute("kdenlive_ix")<<", TRACK: "<<track;
     if (pos < GenTime()) {
         // editing a track effect
         EffectsParameterList effectParams = getEffectArgs(effect);
@@ -1809,7 +1809,7 @@ void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement insertedE
         if (!m_document->renderer()->mltEditEffect(m_document->tracksCount() - track, pos, effectParams))
             emit displayMessage(i18n("Problem editing effect"), ErrorMessage);
         m_document->setTrackEffect(m_document->tracksCount() - track - 1, ix, effect);
-        emit updateTrackEffectState(track - 1);
+        emit updateTrackEffectState(track);
         setDocumentModified();
         return;
 
@@ -4756,6 +4756,11 @@ void CustomTrackView::updateSnapPoints(AbstractClipItem *selected, QList <GenTim
         }
     }
 
+    // add render zone
+    QPoint z = m_document->zone();
+    snaps.append(GenTime(z.x(), m_document->fps()));
+    snaps.append(GenTime(z.y(), m_document->fps()));
+
     qSort(snaps);
     m_scene->setSnapList(snaps);
     //for (int i = 0; i < m_snapPoints.size(); ++i)
@@ -6387,8 +6392,8 @@ EffectsParameterList CustomTrackView::getEffectArgs(const QDomElement effect)
             QStringList values = e.attribute("keyframes").split(";", QString::SkipEmptyParts);
             double factor = e.attribute("factor", "1").toDouble();
             for (int j = 0; j < values.count(); j++) {
-                QString pos = values.at(j).section(":", 0, 0);
-                double val = values.at(j).section(":", 1, 1).toDouble() / factor;
+                QString pos = values.at(j).section(':', 0, 0);
+                double val = values.at(j).section(':', 1, 1).toDouble() / factor;
                 values[j] = pos + "=" + QString::number(val);
             }
             // kDebug() << "/ / / /SENDING KEYFR:" << values;