]> sigrok.org Git - pulseview.git/blobdiff - pv/view/cursor.cpp
Ruler: Moved calculate_tick_spacing into View
[pulseview.git] / pv / view / cursor.cpp
index 03df054304f698132120674363f30d0753f5dde9..071967998eac0047d894bca3e8edf712af736878 100644 (file)
@@ -74,12 +74,13 @@ QRectF Cursor::get_label_rect(const QRect &rect) const
                        label_size.width(), height);
 }
 
-void Cursor::paint_label(QPainter &p, const QRect &rect,
-       unsigned int prefix)
+void Cursor::paint_label(QPainter &p, const QRect &rect)
 {
        const shared_ptr<Cursor> other(get_other_cursor());
        assert(other);
 
+       const unsigned int prefix = view_.tick_prefix();
+
        compute_text_size(p, prefix);
        const QRectF r(get_label_rect(rect));