From: Joel Holdsworth Date: Sat, 13 Dec 2014 15:45:07 +0000 (+0000) Subject: TimeMarker: Fixed position of set_time function X-Git-Tag: pulseview-0.3.0~348 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=70a4886c67e381302d904d1d867abb9d8eac7053;p=pulseview.git TimeMarker: Fixed position of set_time function --- diff --git a/pv/view/timemarker.cpp b/pv/view/timemarker.cpp index ad383059..8eed6e7e 100644 --- a/pv/view/timemarker.cpp +++ b/pv/view/timemarker.cpp @@ -57,16 +57,6 @@ double TimeMarker::time() const return time_; } -float TimeMarker::get_x() const -{ - return (time_ - view_.offset()) / view_.scale(); -} - -QPoint TimeMarker::point() const -{ - return QPoint(get_x(), 0); -} - void TimeMarker::set_time(double time) { time_ = time; @@ -80,6 +70,16 @@ void TimeMarker::set_time(double time) time_changed(); } +float TimeMarker::get_x() const +{ + return (time_ - view_.offset()) / view_.scale(); +} + +QPoint TimeMarker::point() const +{ + return QPoint(get_x(), 0); +} + QRectF TimeMarker::label_rect(const QRectF &rect) const { const float x = (time_ - view_.offset()) / view_.scale();