X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fparameterplotter.cpp;h=99f9e65f04782a10cd5b2624f62c922ba4f7dece;hb=4be9030ba656aeb05ac8b28aaae5aa79cdf461d5;hp=7d8d5d57039a5c17e951089b1e836b4d5d98d80d;hpb=b6bef332a7961e3feba69ba2b34bf3f45cb575ee;p=kdenlive diff --git a/src/parameterplotter.cpp b/src/parameterplotter.cpp index 7d8d5d57..99f9e65f 100644 --- a/src/parameterplotter.cpp +++ b/src/parameterplotter.cpp @@ -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 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);