]> sigrok.org Git - pulseview.git/blobdiff - pv/view/decodetrace.cpp
Do not attempt to draw text for small annotations
[pulseview.git] / 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