diff layer/TimeValueLayer.cpp @ 717:137d3ff48f73 tonioni

Suppress vertical scale when there are no points (scale looks absurd without sensible range)
author Chris Cannam
date Fri, 10 Jan 2014 14:41:38 +0000
parents ceb9a2992d96
children 15b5c679b909
line wrap: on
line diff
--- a/layer/TimeValueLayer.cpp	Fri Jan 10 14:17:50 2014 +0000
+++ b/layer/TimeValueLayer.cpp	Fri Jan 10 14:41:38 2014 +0000
@@ -1230,7 +1230,7 @@
 void
 TimeValueLayer::paintVerticalScale(View *v, bool, QPainter &paint, QRect) const
 {
-    if (!m_model) return;
+    if (!m_model || m_model->getPoints().empty()) return;
 
     QString unit;
     float min, max;