]> sigrok.org Git - pulseview.git/commitdiff
TimeMarker: Fixed position of set_time function
authorJoel Holdsworth <redacted>
Sat, 13 Dec 2014 15:45:07 +0000 (15:45 +0000)
committerJoel Holdsworth <redacted>
Sun, 28 Dec 2014 18:52:53 +0000 (18:52 +0000)
pv/view/timemarker.cpp

index ad3830590a8b059a1d3006275c3e812f0dff2e8e..8eed6e7e2b6240c91c9cef368e3873df100b392b 100644 (file)
@@ -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();