]> sigrok.org Git - pulseview.git/blobdiff - pv/view/timemarker.cpp
DeviceManager: Don't perform scans with DMM drivers
[pulseview.git] / pv / view / timemarker.cpp
index 88616bf20fb2cdb1a06367aeb8ee77250fc2c55b..853f7c02675e0b594606e96eff8574734fcb2fff 100644 (file)
@@ -74,7 +74,8 @@ void TimeMarker::set_time(const pv::util::Timestamp& time)
 
 float TimeMarker::get_x() const
 {
-       return std::roundf(((time_ - view_.offset()) / view_.scale()).convert_to<float>()) + 0.5f;
+       // Use roundf() from cmath, std::roundf() causes Android issues (see #945).
+       return roundf(((time_ - view_.offset()) / view_.scale()).convert_to<float>()) + 0.5f;
 }
 
 QPoint TimeMarker::point(const QRect &rect) const
@@ -154,7 +155,7 @@ void TimeMarker::paint_label(QPainter &p, const QRect &rect, bool hover)
        p.drawText(r, Qt::AlignCenter | Qt::AlignVCenter, get_text());
 }
 
-void TimeMarker::paint_fore(QPainter &p, const ViewItemPaintParams &pp)
+void TimeMarker::paint_fore(QPainter &p, ViewItemPaintParams &pp)
 {
        if (!enabled())
                return;