# HG changeset patch # User Chris Cannam # Date 1572535933 0 # Node ID e95cefd4aa81b49dc789f1216ff4058f82ba46ec # Parent 9a5eede018690305dca1c47bbe5d7c71216c888b Further replacements of QRect::right() with the right (arf) calculation diff -r 9a5eede01869 -r e95cefd4aa81 layer/BoxLayer.cpp --- a/layer/BoxLayer.cpp Thu Oct 31 15:32:01 2019 +0000 +++ b/layer/BoxLayer.cpp Thu Oct 31 15:32:13 2019 +0000 @@ -540,7 +540,8 @@ // Profiler profiler("BoxLayer::paint", true); - int x0 = rect.left() - 40, x1 = rect.right(); + int x0 = rect.left() - 40; + int x1 = x0 + rect.width() + 80; sv_frame_t wholeFrame0 = v->getFrameForX(0); sv_frame_t wholeFrame1 = v->getFrameForX(v->getPaintWidth()); diff -r 9a5eede01869 -r e95cefd4aa81 layer/Colour3DPlotRenderer.cpp --- a/layer/Colour3DPlotRenderer.cpp Thu Oct 31 15:32:01 2019 +0000 +++ b/layer/Colour3DPlotRenderer.cpp Thu Oct 31 15:32:13 2019 +0000 @@ -480,7 +480,7 @@ if (!model) return magRange; int x0 = rect.left(); - int x1 = rect.right() + 1; + int x1 = x0 + rect.width(); int h = v->getPaintHeight(); diff -r 9a5eede01869 -r e95cefd4aa81 layer/NoteLayer.cpp --- a/layer/NoteLayer.cpp Thu Oct 31 15:32:01 2019 +0000 +++ b/layer/NoteLayer.cpp Thu Oct 31 15:32:13 2019 +0000 @@ -719,7 +719,9 @@ // Profiler profiler("NoteLayer::paint", true); - int x0 = rect.left(), x1 = rect.right(); + int x0 = rect.left(); + int x1 = x0 + rect.width(); + sv_frame_t frame0 = v->getFrameForX(x0); sv_frame_t frame1 = v->getFrameForX(x1); diff -r 9a5eede01869 -r e95cefd4aa81 layer/RegionLayer.cpp --- a/layer/RegionLayer.cpp Thu Oct 31 15:32:01 2019 +0000 +++ b/layer/RegionLayer.cpp Thu Oct 31 15:32:13 2019 +0000 @@ -849,7 +849,8 @@ // Profiler profiler("RegionLayer::paint", true); - int x0 = rect.left() - 40, x1 = rect.right(); + int x0 = rect.left() - 40; + int x1 = x0 + rect.width() + 80; sv_frame_t wholeFrame0 = v->getFrameForX(0); sv_frame_t wholeFrame1 = v->getFrameForX(v->getPaintWidth()); diff -r 9a5eede01869 -r e95cefd4aa81 layer/TextLayer.cpp --- a/layer/TextLayer.cpp Thu Oct 31 15:32:01 2019 +0000 +++ b/layer/TextLayer.cpp Thu Oct 31 15:32:13 2019 +0000 @@ -299,7 +299,9 @@ // Profiler profiler("TextLayer::paint", true); - int x0 = rect.left(), x1 = rect.right(); + int x0 = rect.left(); + int x1 = x0 + rect.width(); + int overlap = ViewManager::scalePixelSize(150); sv_frame_t frame0 = v->getFrameForX(x0 - overlap); sv_frame_t frame1 = v->getFrameForX(x1 + overlap); diff -r 9a5eede01869 -r e95cefd4aa81 layer/TimeValueLayer.cpp --- a/layer/TimeValueLayer.cpp Thu Oct 31 15:32:01 2019 +0000 +++ b/layer/TimeValueLayer.cpp Thu Oct 31 15:32:13 2019 +0000 @@ -915,7 +915,8 @@ // Profiler profiler("TimeValueLayer::paint", true); - int x0 = rect.left(), x1 = rect.right(); + int x0 = rect.left(); + int x1 = x0 + rect.width(); sv_frame_t frame0 = v->getFrameForX(x0); sv_frame_t frame1 = v->getFrameForX(x1); if (m_derivative) --frame0;