]> sigrok.org Git - pulseview.git/commitdiff
Do not attempt to draw text for small annotations
authorJoel Holdsworth <redacted>
Wed, 5 Mar 2014 21:33:02 +0000 (22:33 +0100)
committerJoel Holdsworth <redacted>
Thu, 13 Mar 2014 17:00:34 +0000 (17:00 +0000)
pv/view/decodetrace.cpp

index 9f8306ea8ef9c7f0983e99cb321978fdc7eb2bf9..e4f02760eaa0b6b1719cdeb8bb323be3bd10a512 100644 (file)
@@ -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