Mercurial > hg > svgui
diff layer/LinearColourScale.cpp @ 810:b68af2be4545 tonioni
Merge from branch warnfix_no_size_t
author | Chris Cannam |
---|---|
date | Wed, 18 Jun 2014 13:42:25 +0100 |
parents | 1d526ba11a24 |
children | 3ca3b8fbbcee |
line wrap: on
line diff
--- a/layer/LinearColourScale.cpp Mon Jun 16 12:50:27 2014 +0100 +++ b/layer/LinearColourScale.cpp Wed Jun 18 13:42:25 2014 +0100 @@ -23,7 +23,7 @@ #include "view/View.h" int -LinearColourScale::getWidth(View *v, +LinearColourScale::getWidth(View *, QPainter &paint) { return paint.fontMetrics().width("-000.00") + 15; @@ -33,7 +33,7 @@ LinearColourScale::paintVertical(View *v, const ColourScaleLayer *layer, QPainter &paint, - int x0, + int /* x0 */, float min, float max) { @@ -46,8 +46,6 @@ char buffer[40]; - int w = getWidth(v, paint) + x0; - int boxx = 5, boxy = 5; if (layer->getScaleUnits() != "") { boxy += paint.fontMetrics().height(); @@ -65,16 +63,16 @@ } paint.restore(); - float round = 1.f; +// float round = 1.f; int dp = 0; if (inc > 0) { int prec = trunc(log10f(inc)); prec -= 1; if (prec < 0) dp = -prec; - round = powf(10.f, prec); -#ifdef DEBUG_TIME_VALUE_LAYER - cerr << "inc = " << inc << ", round = " << round << ", dp = " << dp << endl; -#endif +// round = powf(10.f, prec); +//#ifdef DEBUG_TIME_VALUE_LAYER +// cerr << "inc = " << inc << ", round = " << round << ", dp = " << dp << endl; +//#endif } for (int i = 0; i < n; ++i) {