# HG changeset patch # User Chris Cannam # Date 1484560819 0 # Node ID c06861dec2452e4b18e596ee2485c909a42151b3 # Parent 4f1f3e1a4f63395a6d4baa673bff488d655d6bb3 Fix incorrect call to getColumn() that broke the peak-frequency spectrogram and close zoom levels of the colour 3d plot diff -r 4f1f3e1a4f63 -r c06861dec245 layer/Colour3DPlotRenderer.cpp --- a/layer/Colour3DPlotRenderer.cpp Fri Jan 13 15:44:39 2017 +0000 +++ b/layer/Colour3DPlotRenderer.cpp Mon Jan 16 10:00:19 2017 +0000 @@ -402,7 +402,7 @@ // peak pick -> distribute/interpolate -> apply display gain // this does the first three: - preparedColumn = getColumn(sx, minbin, nbins, false); + preparedColumn = getColumn(sx, minbin, nbins, -1); magRange.sample(preparedColumn); @@ -1078,7 +1078,7 @@ } if (sx != psx) { - preparedColumn = getColumn(sx, minbin, nbins, false); + preparedColumn = getColumn(sx, minbin, nbins, -1); magRange.sample(preparedColumn); psx = sx; } @@ -1119,10 +1119,15 @@ int iy = int(y + 0.5); if (iy < 0 || iy >= h) continue; - m_drawBuffer.setPixel - (x, - iy, - m_params.colourScale.getPixel(value)); + auto pixel = m_params.colourScale.getPixel(value); + +#ifdef DEBUG_COLOUR_PLOT_REPAINT +// SVDEBUG << "frequency " << freq << " for bin " << bin +// << " -> y = " << y << ", iy = " << iy << ", value = " +// << value << ", pixel " << pixel << "\n"; +#endif + + m_drawBuffer.setPixel(x, iy, pixel); } m_magRanges.push_back(magRange);