X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fruler.cpp;h=d323f9be0525be8c5e39f3621d6c4ca9f05e0f5b;hb=332afa7438aa5532599fe65f9092e1b24b34fe04;hp=0322af8a611e1ad9520b854e2cbae0b7ec39ad81;hpb=0ba172cf7a0cecee952ed195cf80585bfb01f831;p=pulseview.git diff --git a/pv/view/ruler.cpp b/pv/view/ruler.cpp index 0322af8..d323f9b 100644 --- a/pv/view/ruler.cpp +++ b/pv/view/ruler.cpp @@ -163,7 +163,8 @@ void Ruler::paintEvent(QPaintEvent*) } while (x < width()); // Draw the cursors - draw_cursors(p, prefix); + if (_view.cursors_shown()) + _view.cursors().draw_markers(p, rect(), prefix); // Draw the hover mark draw_hover_mark(p); @@ -202,17 +203,6 @@ void Ruler::mouseReleaseEvent(QMouseEvent *) _grabbed_marker = NULL; } -void Ruler::draw_cursors(QPainter &p, unsigned int prefix) -{ - if (!_view.cursors_shown()) - return; - - const QRect r = rect(); - CursorPair &cursors = _view.cursors(); - cursors.first().paint_label(p, r, prefix); - cursors.second().paint_label(p, r, prefix); -} - void Ruler::draw_hover_mark(QPainter &p) { const int x = _view.hover_point().x();