From 4eb048bba25b4326b7cfe79c315df93eb78aab3a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 14 Jun 2024 16:10:21 +0100 Subject: [PATCH] Don't assume AC gains will always be voltages. Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205 --- eeschema/dialogs/dialog_sim_format_value.cpp | 2 +- eeschema/sim/sim_plot_tab.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eeschema/dialogs/dialog_sim_format_value.cpp b/eeschema/dialogs/dialog_sim_format_value.cpp index cda1d73cc7..968f8d43f2 100644 --- a/eeschema/dialogs/dialog_sim_format_value.cpp +++ b/eeschema/dialogs/dialog_sim_format_value.cpp @@ -50,7 +50,7 @@ DIALOG_SIM_FORMAT_VALUE::DIALOG_SIM_FORMAT_VALUE( wxWindow* aParent, SPICE_VALUE m_units = aFormat->Range.Right( 2 ); SetTitle( wxString::Format( GetTitle(), _( "Frequency" ) ) ); } - else if( aFormat->Range.EndsWith( wxS( "dBV" ) ) ) + else if( aFormat->Range.EndsWith( wxS( "dB" ) ) ) { m_units = aFormat->Range.Right( 3 ); SetTitle( wxString::Format( GetTitle(), _( "Gain" ) ) ); diff --git a/eeschema/sim/sim_plot_tab.cpp b/eeschema/sim/sim_plot_tab.cpp index 2479564b4d..389c9e37cb 100644 --- a/eeschema/sim/sim_plot_tab.cpp +++ b/eeschema/sim/sim_plot_tab.cpp @@ -545,7 +545,7 @@ void SIM_PLOT_TAB::updateAxes( int aNewTraceType ) m_axis_x->SetNameAlign( mpALIGN_BOTTOM ); m_plotWin->AddLayer( m_axis_x ); - m_axis_y1 = new LIN_SCALE( wxEmptyString, wxT( "dBV" ), mpALIGN_LEFT ); + m_axis_y1 = new LIN_SCALE( wxEmptyString, wxT( "dB" ), mpALIGN_LEFT ); m_axis_y1->SetNameAlign( mpALIGN_LEFT ); m_plotWin->AddLayer( m_axis_y1 );