# HG changeset patch # User Chris Cannam # Date 1571224408 -3600 # Node ID 9ce6f69cd485e059fe53589ceefa5383b5547525 # Parent bfacecf7ea7e8b8cb5b2b33b464a8fe735e77992 Debug output tweaks diff -r bfacecf7ea7e -r 9ce6f69cd485 layer/TimeValueLayer.cpp --- a/layer/TimeValueLayer.cpp Tue Oct 15 14:53:25 2019 +0100 +++ b/layer/TimeValueLayer.cpp Wed Oct 16 12:13:28 2019 +0100 @@ -784,8 +784,18 @@ if (!v->getVisibleExtentsForUnit(getScaleUnits(), min, max, log)) { min = model->getValueMinimum(); max = model->getValueMaximum(); - } else if (log) { - LogRange::mapRange(min, max); + } else { +#ifdef DEBUG_TIME_VALUE_LAYER + SVCERR << "getScaleExtents: view returned min = " << min + << ", max = " << max << ", log = " << log << endl; +#endif + if (log) { + LogRange::mapRange(min, max); +#ifdef DEBUG_TIME_VALUE_LAYER + SVCERR << "getScaleExtents: mapped to min = " << min + << ", max = " << max << endl; +#endif + } } } else if (m_verticalScale == PlusMinusOneScale) { @@ -818,12 +828,15 @@ getScaleExtents(v, min, max, logarithmic); #ifdef DEBUG_TIME_VALUE_LAYER - cerr << "getYForValue(" << val << "): min " << min << ", max " - << max << ", log " << logarithmic << endl; + SVCERR << "getYForValue(" << val << "): min " << min << ", max " + << max << ", log " << logarithmic << endl; #endif if (logarithmic) { val = LogRange::map(val); +#ifdef DEBUG_TIME_VALUE_LAYER + SVCERR << "-> " << val << endl; +#endif } return int(h - ((val - min) * h) / (max - min));