]> sigrok.org Git - pulseview.git/commitdiff
Fix #982 by correcting the bounding rect for the message
authorSoeren Apel <redacted>
Wed, 14 Jun 2017 16:38:13 +0000 (18:38 +0200)
committerUwe Hermann <redacted>
Sat, 17 Jun 2017 19:21:53 +0000 (21:21 +0200)
pv/views/trace/decodetrace.cpp

index 6ccd3fb87dc085f9c50b9baa109645ac68c9b213..ef8210492ddc09d5f3b7a9bfd7cbf09187056a67 100644 (file)
@@ -583,7 +583,7 @@ void DecodeTrace::draw_error(QPainter &p, const QString &message,
        p.setBrush(ErrorBgColour);
 
        const QRectF bounding_rect =
-               QRectF(pp.width(), INT_MIN / 2 + y, pp.width(), INT_MAX);
+               QRectF(pp.left(), INT_MIN / 2 + y, pp.right(), INT_MAX);
        const QRectF text_rect = p.boundingRect(bounding_rect,
                Qt::AlignCenter, message);
        const float r = text_rect.height() / 4;