From: Joel Holdsworth Date: Wed, 5 Mar 2014 21:33:02 +0000 (+0100) Subject: Do not attempt to draw text for small annotations X-Git-Tag: pulseview-0.2.0~18 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0f290e9b8109cc5324706fa029ed7f28f462d754;p=pulseview.git Do not attempt to draw text for small annotations --- diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index 9f8306ea..e4f02760 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -421,6 +421,9 @@ void DecodeTrace::draw_range(const pv::data::decode::Annotation &a, QPainter &p, QRectF rect(start + cap_width, y - h / 2, end - start - cap_width * 2, h); + if (rect.width() <= 4) + return; + p.setPen(text_color); // Try to find an annotation that will fit