|
From: Tapio V. <aa...@us...> - 2011-02-24 09:16:43
|
Author: Tapio Vierros <tap...@gm...> Date: Thu Feb 24 11:15:41 2011 +0200 Fixed QPainter errors when zoomed out. --- notelabel.cc | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/notelabel.cc b/notelabel.cc index e218386..7292613 100644 --- a/notelabel.cc +++ b/notelabel.cc @@ -34,6 +34,8 @@ void NoteLabel::createPixmap() QSize size(100, metric.size(Qt::TextSingleLine, lyric()).height() + 2 * text_margin); if (ngw) size.setWidth(ngw->s2px(m_note.length())); + if (size.isEmpty()) return; + QImage image(size.width(), size.height(), QImage::Format_ARGB32_Premultiplied); image.fill(qRgba(0, 0, 0, 0)); |