]> git.sesse.net Git - kdenlive/commitdiff
Automatically crop relative to the project resolution on clips using proxies:
authorTill Theato <root@ttill.de>
Wed, 20 Apr 2011 10:58:18 +0000 (10:58 +0000)
committerTill Theato <root@ttill.de>
Wed, 20 Apr 2011 10:58:18 +0000 (10:58 +0000)
http://www.kdenlive.org/mantis/view.php?id=2056

svn path=/trunk/kdenlive/; revision=5542

src/clipitem.cpp

index 5e1851d3cbf092ca4aaa88b53a4ff776ecfb0bcf..d7d9819c0458cfcf15604249ca9369dbbad2132f 100644 (file)
@@ -248,6 +248,12 @@ void ClipItem::initEffect(QDomElement effect, int diff)
             }
         }
 
+        if (effect.attribute("id") == "crop") {
+            // default use_profile to 1 for clips with proxies to avoid problems when rendering
+            if (e.attribute("name") == "use_profile" && !(m_clip->getProperty("proxy").isEmpty() || m_clip->getProperty("proxy") == "-"))
+                e.setAttribute("value", "1");
+        }
+
         if ((e.attribute("type") == "keyframe" || e.attribute("type") == "simplekeyframe") && e.attribute("keyframes").isEmpty()) {
             // Effect has a keyframe type parameter, we need to set the values
             e.setAttribute("keyframes", QString::number(cropStart().frames(m_fps)) + ':' + e.attribute("default"));