]> sigrok.org Git - pulseview.git/commitdiff
AnalogSignal: Set initial value for the "value at cursor" variable
authorSoeren Apel <redacted>
Mon, 20 Aug 2018 13:57:33 +0000 (15:57 +0200)
committerUwe Hermann <redacted>
Tue, 21 Aug 2018 10:02:38 +0000 (12:02 +0200)
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

index 0994d92ed0eba4e30484abc79af17f8fec9512b0..ac5e83c834880f4e85f5f9fd2c8203ebf017301b 100644 (file)
@@ -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<float>::quiet_NaN())
 {
        axis_pen_ = AxisPen;