]> git.sesse.net Git - kdenlive/blobdiff - src/parameterplotter.cpp
Improve profile selection in First run wizard
[kdenlive] / src / parameterplotter.cpp
index 7d8d5d57039a5c17e951089b1e836b4d5d98d80d..99f9e65f04782a10cd5b2624f62c922ba4f7dece 100644 (file)
@@ -92,12 +92,11 @@ void ParameterPlotter::setPointLists(const QDomElement& d, const QString& paramN
         else if (pa.attribute("default").contains(";"))
             defaults = pa.attribute("default").split(";");
         QStringList maxv = pa.attribute("max").split(";");
-        QStringList minv = pa.attribute("max").split(";");
+        QStringList minv = pa.attribute("min").split(";");
         for (int i = 0;i < maxv.size() && i < minv.size();i++) {
             if (max_y < maxv[i].toInt()) max_y = maxv[i].toInt();
             if (min_y > minv[i].toInt()) min_y = minv[i].toInt();
         }
-
         for (int i = 0;i < parameterNameList.count();i++) {
             KPlotObject *plot = new KPlotObject(colors[plotobjects.size()%colors.size()]);
             plot->setShowLines(true);
@@ -151,7 +150,7 @@ void ParameterPlotter::createParametersNew() {
     if (namenode.count() > 0) {
         for (int i = 0;i < plotobjs.count();i++) {
             QList<KPlotPoint*> points = plotobjs[i]->points();
-            foreach(KPlotPoint *o, points) {
+            foreach(const KPlotPoint *o, points) {
                 txtstr << (int)o->y() ;
                 break;//first no keyframes
             }
@@ -237,7 +236,7 @@ void ParameterPlotter::mousePressEvent(QMouseEvent * event) {
                 double newx = inPlot.x() * dataRect().width() / pixRect().width();
                 double newy = (height() - inPlot.y() - bottomPadding() - topPadding()) * dataRect().height() / pixRect().height();
                 bool inserted = false;
-                foreach(KPlotPoint* pt, points) {
+                foreach(const KPlotPoint* pt, points) {
                     if (pt->x() > newx && !inserted) {
                         newpoints.append(QPointF(newx, newy));
                         inserted = true;
@@ -245,7 +244,7 @@ void ParameterPlotter::mousePressEvent(QMouseEvent * event) {
                     newpoints.append(QPointF(pt->x(), pt->y()));
                 }
                 p->clearPoints();
-                foreach(QPointF qf, newpoints) {
+                foreach(const QPointF qf, newpoints) {
                     p->addPoint(qf);
                 }
                 replacePlotObject(activeIndexPlot, p);