]> sigrok.org Git - pulseview.git/commitdiff
Fixed timeline scale
authorJoel Holdsworth <redacted>
Wed, 17 Oct 2012 19:40:44 +0000 (20:40 +0100)
committerJoel Holdsworth <redacted>
Sat, 20 Oct 2012 17:29:25 +0000 (18:29 +0100)
pv/view/ruler.cpp

index f71240de1722c301d9b6ad0bb1960a8ff338e5ed..5dea19474c84714a3f653e8449ff099f0f700625 100644 (file)
@@ -68,7 +68,7 @@ void Ruler::paintEvent(QPaintEvent *event)
        assert(prefix >= 0);
        assert(prefix < countof(SIPrefixes));
 
-       const double multiplier = pow(0.1, prefix * 3 + FirstSIPrefixPower);
+       const double multiplier = pow(10.0, - prefix * 3 - FirstSIPrefixPower);
 
        const int text_height = p.boundingRect(0, 0, INT_MAX, INT_MAX,
                Qt::AlignLeft | Qt::AlignTop, "8").height();