# HG changeset patch # User Chris Cannam # Date 1232983112 0 # Node ID 72a080272a4e42bbd552e562482d27dfd884e720 # Parent 26d1ddc0ce96c456824e3d0ad8fbfa319ffe9c6e * Change QMutex in Editable DTDM to a read/write lock diff -r 26d1ddc0ce96 -r 72a080272a4e layer/Colour3DPlotLayer.cpp --- a/layer/Colour3DPlotLayer.cpp Mon Jan 26 10:49:31 2009 +0000 +++ b/layer/Colour3DPlotLayer.cpp Mon Jan 26 15:18:32 2009 +0000 @@ -722,6 +722,7 @@ size_t modelEndBin = modelEnd / modelResolution; size_t cacheWidth = modelEndBin - modelStartBin + 1; + if (lastBin > modelEndBin) cacheWidth = lastBin - modelStartBin + 1; size_t cacheHeight = m_model->getHeight(); if (m_cache && (m_cache->height() != int(cacheHeight))) { @@ -1096,7 +1097,7 @@ int x1 = rect.right() + 1; const int w = x1 - x0; // const so it can be used as array size below - int h = v->height(); + int h = v->height(); // we always paint full height int sh = m_model->getHeight(); int symin = m_miny; @@ -1162,7 +1163,9 @@ goto copy; } - memset(peaks, 0, w); + for (int x = 0; x < w; ++x) { + peaks[x] = 0; + } for (int sy = sy0i; sy <= sy1i; ++sy) {