X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fdecodetrace.cpp;h=618de9a338fe88c566f3e2904a56ae483755d9b6;hp=c3bc1dff0a4981170e86b748fe8f45c1a7206b33;hb=ea86bc4d01851dab34b6ec0e1015a224cecc0fd5;hpb=8bd26d8b9c831b509ee3241ea4dac6f50c023622 diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index c3bc1dff..618de9a3 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -373,7 +373,7 @@ void DecodeTrace::draw_instant(const pv::data::decode::Annotation &a, QPainter & { const QString text = a.annotations().empty() ? QString() : a.annotations().back(); - const double w = min(p.boundingRect(QRectF(), 0, text).width(), + const double w = min((double)p.boundingRect(QRectF(), 0, text).width(), 0.0) + h; const QRectF rect(x - w / 2, y - h / 2, w, h);