From d5e50b70bbbf1a1a95db62e2a6ecb59801cb066d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 16 Feb 2023 16:55:26 +0000 Subject: [PATCH] Display a generic "Value" column label when there are no cursors. --- eeschema/sim/sim_plot_frame.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index 050d1e4af1..4713b552b6 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -2279,12 +2279,15 @@ void SIM_PLOT_FRAME::updateCursors() wxString valColName = _( "Value" ); - if( !cursor1Name.IsEmpty() && cursor2Name.IsEmpty() ) - valColName = cursor1Name; - else if( !cursor2Name.IsEmpty() && cursor1Name.IsEmpty() ) + if( !cursor1Name.IsEmpty() ) + { + if( cursor2Name.IsEmpty() || cursor1Name == cursor2Name ) + valColName = cursor1Name; + } + else if( !cursor2Name.IsEmpty() ) + { valColName = cursor2Name; - else if( cursor1Name == cursor2Name ) - valColName = cursor1Name; + } m_cursorsGrid->SetColLabelValue( COL_CURSOR_Y, valColName ); }