comparison 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
comparison
equal deleted inserted replaced
877:7463ece5d5e8 880:dd95abfe736c
714 } 714 }
715 715
716 void 716 void
717 Pane::drawCentreLine(int sampleRate, QPainter &paint, bool omitLine) 717 Pane::drawCentreLine(int sampleRate, QPainter &paint, bool omitLine)
718 { 718 {
719 if (omitLine && m_manager->getMainModelSampleRate() == 0) {
720 return;
721 }
722
719 int fontHeight = paint.fontMetrics().height(); 723 int fontHeight = paint.fontMetrics().height();
720 int fontAscent = paint.fontMetrics().ascent(); 724 int fontAscent = paint.fontMetrics().ascent();
721 725
722 QColor c = QColor(0, 0, 0); 726 QColor c = QColor(0, 0, 0);
723 if (!hasLightBackground()) { 727 if (!hasLightBackground()) {