diff view/Pane.cpp @ 880:dd95abfe736c alignment_view

Avoid drawing a single lonesome 0 if nothing is loaded at all
author Chris Cannam
date Fri, 21 Nov 2014 11:48:21 +0000
parents 7463ece5d5e8
children d4446f267e12
line wrap: on
line diff
--- a/view/Pane.cpp	Fri Nov 14 10:19:50 2014 +0000
+++ b/view/Pane.cpp	Fri Nov 21 11:48:21 2014 +0000
@@ -716,6 +716,10 @@
 void
 Pane::drawCentreLine(int sampleRate, QPainter &paint, bool omitLine)
 {
+    if (omitLine && m_manager->getMainModelSampleRate() == 0) {
+        return;
+    }
+    
     int fontHeight = paint.fontMetrics().height();
     int fontAscent = paint.fontMetrics().ascent();