From 0f290e9b8109cc5324706fa029ed7f28f462d754 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 5 Mar 2014 22:33:02 +0100 Subject: [PATCH] Do not attempt to draw text for small annotations --- pv/view/decodetrace.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.30.2