Show ruler timestamps in cursors and popups
[pulseview.git] / pv / views / trace / timemarker.cpp
index 266007a57053c220f59a87fe80eb630438a413c0..c58aa08dbc5926d08f10455af50b1efccf4b36b6 100644 (file)
@@ -65,7 +65,7 @@ void TimeMarker::set_time(const pv::util::Timestamp& time)
 
        if (value_widget_) {
                updating_value_widget_ = true;
-               value_widget_->setValue(time);
+               value_widget_->setValue(view_.absolute_to_ruler_time(time));
                updating_value_widget_ = false;
        }
 
@@ -179,7 +179,7 @@ pv::widgets::Popup* TimeMarker::create_popup(QWidget *parent)
        popup->setLayout(form);
 
        value_widget_ = new pv::widgets::TimestampSpinBox(parent);
-       value_widget_->setValue(time_);
+       value_widget_->setValue(view_.absolute_to_ruler_time(time_));
 
        connect(value_widget_, SIGNAL(valueChanged(const pv::util::Timestamp&)),
                this, SLOT(on_value_changed(const pv::util::Timestamp&)));
@@ -192,7 +192,7 @@ pv::widgets::Popup* TimeMarker::create_popup(QWidget *parent)
 void TimeMarker::on_value_changed(const pv::util::Timestamp& value)
 {
        if (!updating_value_widget_)
-               set_time(value);
+               set_time(view_.ruler_to_absolute_time(value));
 }
 
 } // namespace trace