From: Soeren Apel Date: Wed, 14 Jun 2017 16:38:13 +0000 (+0200) Subject: Fix #982 by correcting the bounding rect for the message X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a998be27f155eee556f7ec521e5f70ce692026dc;p=pulseview.git Fix #982 by correcting the bounding rect for the message --- diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp index 6ccd3fb8..ef821049 100644 --- a/pv/views/trace/decodetrace.cpp +++ b/pv/views/trace/decodetrace.cpp @@ -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;