]> sigrok.org Git - pulseview.git/blobdiff - pv/view/decodetrace.cpp
Fix polymorphic function lookup problem
[pulseview.git] / pv / view / decodetrace.cpp
index c3bc1dff0a4981170e86b748fe8f45c1a7206b33..618de9a338fe88c566f3e2904a56ae483755d9b6 100644 (file)
@@ -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);