Accept new position on enter press in cursor popups
[pulseview.git] / pv / views / trace / timemarker.cpp
index ec4c97d78937fb8d76ec42e8e69fa670897ce3f7..3249d3da77daaa7cfaf40960fcddc38fc970ea7e 100644 (file)
@@ -50,8 +50,7 @@ TimeMarker::TimeMarker(
        color_(color),
        time_(time),
        value_action_(nullptr),
-       value_widget_(nullptr),
-       updating_value_widget_(false)
+       value_widget_(nullptr)
 {
 }
 
@@ -65,9 +64,8 @@ void TimeMarker::set_time(const pv::util::Timestamp& time)
        time_ = time;
 
        if (value_widget_) {
-               updating_value_widget_ = true;
+               QSignalBlocker blocker(value_widget_);
                value_widget_->setValue(view_.ruler()->get_ruler_time_from_absolute_time(time));
-               updating_value_widget_ = false;
        }
 
        view_.time_item_appearance_changed(true, true);
@@ -192,8 +190,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(view_.ruler()->get_absolute_time_from_ruler_time(value));
+       set_time(view_.ruler()->get_absolute_time_from_ruler_time(value));
 }
 
 } // namespace trace