diff layer/TimeValueLayer.cpp @ 27:38fe0ea9e46e

* Some fixes to waveform layer greyscaling * Tidying in panner class
author Chris Cannam
date Fri, 03 Feb 2006 17:30:47 +0000
parents 94381052a6c9
children 202d1dca67d2
line wrap: on
line diff
--- a/layer/TimeValueLayer.cpp	Thu Feb 02 17:31:08 2006 +0000
+++ b/layer/TimeValueLayer.cpp	Fri Feb 03 17:30:47 2006 +0000
@@ -462,23 +462,22 @@
 	    SparseTimeValueModel::PointList::const_iterator j = i;
 	    ++j;
 
+	    int nx;
+
 	    if (j != points.end()) {
-		
 		const SparseTimeValueModel::Point &q(*j);
-		int nx = getXForFrame(q.frame);
+		nx = getXForFrame(q.frame);
+	    } else {
+		nx = getXForFrame(m_model->getEndFrame());
+	    }
 
-		if (nx == x) continue;
+	    if (nx <= x) continue;
 
-		if (nx < x + 5 && illuminateFrame != p.frame) {
-		    paint.setPen(Qt::NoPen);
-		}
+	    if (nx < x + 5 && illuminateFrame != p.frame) {
+		paint.setPen(Qt::NoPen);
+	    }
 
-		paint.drawRect(x, -1, nx - x, m_view->height() + 1);
-
-	    } else {
-
-		paint.drawLine(x, 0, x, m_view->height());
-	    }
+	    paint.drawRect(x, -1, nx - x, m_view->height() + 1);
 	}
 
 ///	if (p.label != "") {