Mercurial > hg > svgui
changeset 1534:bfd8b22fd67c
Fix #1904 Scrolling colour 3d plot does not always work when in View normalisation mode. We shouldn't imagine we've just invalidated the cache if the truth is that we've only just created the renderer
author | Chris Cannam |
---|---|
date | Wed, 09 Oct 2019 13:45:17 +0100 |
parents | 37df1530519d |
children | 873ff035364c |
files | layer/Colour3DPlotRenderer.cpp |
diffstat | 1 files changed, 17 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/Colour3DPlotRenderer.cpp Wed Oct 09 11:51:19 2019 +0100 +++ b/layer/Colour3DPlotRenderer.cpp Wed Oct 09 13:45:17 2019 +0100 @@ -133,9 +133,25 @@ sv_frame_t startFrame = v->getStartFrame(); +#ifdef DEBUG_COLOUR_PLOT_REPAINT + SVDEBUG << "render " << m_sources.source + << ": cache size is " << m_cache.getSize().width() + << "x" << m_cache.getSize().height() + << " at zoom level " << m_cache.getZoomLevel() << endl; +#endif + + bool justCreated = m_cache.getSize().isEmpty(); + bool justInvalidated = (m_cache.getSize() != v->getPaintSize() || m_cache.getZoomLevel() != v->getZoomLevel()); + +#ifdef DEBUG_COLOUR_PLOT_REPAINT + SVDEBUG << "render " << m_sources.source + << ": justCreated = " << justCreated + << ", justInvalidated = " << justInvalidated + << endl; +#endif m_cache.resize(v->getPaintSize()); m_cache.setZoomLevel(v->getZoomLevel()); @@ -303,7 +319,7 @@ } else { // must be DrawBufferPixelResolution, handled DirectTranslucent earlier - if (timeConstrained && justInvalidated) { + if (timeConstrained && !justCreated && justInvalidated) { SVDEBUG << "render " << m_sources.source << ": invalidated cache in time-constrained context, that's all we're doing for now - wait for next update to start filling" << endl; } else {