changeset 1550:e95cefd4aa81

Further replacements of QRect::right() with the right (arf) calculation
author Chris Cannam
date Thu, 31 Oct 2019 15:32:13 +0000
parents 9a5eede01869
children 045063dcd2bc
files layer/BoxLayer.cpp layer/Colour3DPlotRenderer.cpp layer/NoteLayer.cpp layer/RegionLayer.cpp layer/TextLayer.cpp layer/TimeValueLayer.cpp
diffstat 6 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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());
--- 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();
 
--- 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);
 
--- 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());
--- 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);
--- 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;