]> git.sesse.net Git - kdenlive/commitdiff
Copy the boolean heuristic detection from effects to transitions.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 16 Jan 2014 23:47:11 +0000 (00:47 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 13 Mar 2014 21:16:54 +0000 (22:16 +0100)
This makes the “Reverse” checkbox for the movit mix effect work.

src/initeffects.cpp

index a8c8046609441cc56b0e590ddbc4b89860e1f400..a9dd406bf302b2489c558395a4a98d60f8c330df 100644 (file)
@@ -617,8 +617,12 @@ void initEffects::fillTransitionsList(Mlt::Repository *repository, EffectsList *
                 if (paramdesc.get("minimum"))
                     params.setAttribute("min", paramdesc.get("minimum"));
                 if (QString(paramdesc.get("type")) == "integer") {
-                    params.setAttribute("type", "constant");
-                    params.setAttribute("factor", "100");
+                    if (params.attribute("min") == "0" && params.attribute("max") == "1")
+                        params.setAttribute("type", "bool");
+                    else {
+                        params.setAttribute("type", "constant");
+                        params.setAttribute("factor", "100");
+                    }
                 }
                 if (QString(paramdesc.get("type")) == "boolean")
                     params.setAttribute("type", "bool");