# HG changeset patch # User Chris Cannam # Date 1525784842 -3600 # Node ID 6e35062fc10ad4a16397f34e0a3597116c20280a # Parent f90a3c2f2930e8acd2dfef09a0951fdfc9ed48cb Tidy diff -r f90a3c2f2930 -r 6e35062fc10a layer/PaintAssistant.cpp --- a/layer/PaintAssistant.cpp Thu May 03 15:24:14 2018 +0100 +++ b/layer/PaintAssistant.cpp Tue May 08 14:07:22 2018 +0100 @@ -56,13 +56,11 @@ } while (!round && mult < limit); if (round) { mult /= 10; -// cerr << "\n\nstep goes from " << step; step = double(round) / mult; n = int(lrint((maxVal - minVal) / step)); if (mult > 1) { mult /= 10; } -// cerr << " to " << step << " (n = " << n << ")" << endl; } } @@ -117,7 +115,6 @@ if (spaceForLabel) { int tx = 3; -// if (scale != LinearScale) { if (paint.fontMetrics().width(text) < w - 10) { tx = w - 10 - paint.fontMetrics().width(text); } @@ -126,8 +123,6 @@ if (ty < paint.fontMetrics().ascent()) { ty = paint.fontMetrics().ascent(); -// } else if (ty > rect.y() + h - paint.fontMetrics().descent()) { -// ty = rect.y() + h - paint.fontMetrics().descent(); } else { ty += toff; } @@ -135,19 +130,7 @@ paint.drawText(tx, ty, text); lastLabelledY = ty - toff; - /* - if (ny != y) { - ty = ny; - if (ty < paint.fontMetrics().ascent()) { - ty = paint.fontMetrics().ascent(); - } else if (ty > h - paint.fontMetrics().descent()) { - ty = h - paint.fontMetrics().descent(); - } else { - ty += toff; - } - paint.drawText(tx, ty, text); - } - */ + paint.drawLine(w - 7, y, w, y); if (vy) vy->push_back(y); @@ -188,18 +171,13 @@ { int vy = 0; -// int m = height/2; -// int my = minY + m; - switch (scale) { case LinearScale: -// vy = my - int(m * value); vy = minY + height - int(((value - minVal) / (maxVal - minVal)) * height); break; case MeterScale: -// vy = my - AudioLevel::multiplier_to_preview(value, m); vy = minY + height - AudioLevel::multiplier_to_preview ((value - minVal) / (maxVal - minVal), height); break; @@ -239,7 +217,6 @@ QRect r = paint.fontMetrics().boundingRect(text); r.translate(QPoint(x, y)); -// cerr << "drawVisibleText: r = " << r.x() << "," <