From 82e7f4b3f640b6f8bfbd094e478cbe344cc8fc11 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Mon, 20 Aug 2018 15:57:33 +0200 Subject: [PATCH] AnalogSignal: Set initial value for the "value at cursor" variable Without this, the analog traces show random values after startup until the mouse cursor enters the application window and the cursor position updates. --- pv/views/trace/analogsignal.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pv/views/trace/analogsignal.cpp b/pv/views/trace/analogsignal.cpp index 0994d92..ac5e83c 100644 --- a/pv/views/trace/analogsignal.cpp +++ b/pv/views/trace/analogsignal.cpp @@ -109,7 +109,8 @@ AnalogSignal::AnalogSignal( neg_vdivs_(1), resolution_(0), display_type_(DisplayBoth), - autoranging_(true) + autoranging_(true), + value_at_hover_pos_(std::numeric_limits::quiet_NaN()) { axis_pen_ = AxisPen; -- 2.30.2