Mercurial > hg > svgui
changeset 1540:9ce6f69cd485
Debug output tweaks
author | Chris Cannam |
---|---|
date | Wed, 16 Oct 2019 12:13:28 +0100 |
parents | bfacecf7ea7e |
children | b4b5b8dd5fe1 |
files | layer/TimeValueLayer.cpp |
diffstat | 1 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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));