changeset 1461:e561f0a8d75b

Fix incorrect repaint at left edge in segmentation mode
author Chris Cannam
date Mon, 20 May 2019 15:04:07 +0100
parents 69b7fdd6394f
children 6bd413aff85c
files layer/TimeInstantLayer.cpp
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/layer/TimeInstantLayer.cpp	Fri May 17 14:37:02 2019 +0100
+++ b/layer/TimeInstantLayer.cpp	Mon May 20 15:04:07 2019 +0100
@@ -304,7 +304,15 @@
     sv_frame_t frame0 = v->getFrameForX(x0);
     sv_frame_t frame1 = v->getFrameForX(x1);
 
-    EventVector points(m_model->getEventsWithin(frame0, frame1 - frame0));
+    int overspill = 0;
+    if (m_plotStyle == PlotSegmentation) {
+        // We need to start painting at the prior point, so we can
+        // fill in the visible part of its segmentation area
+        overspill = 1;
+    }
+    
+    EventVector points(m_model->getEventsWithin(frame0, frame1 - frame0,
+                                                overspill));
 
     bool odd = false;
     if (m_plotStyle == PlotSegmentation && !points.empty()) {