Don't assume AC gains will always be voltages.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205
This commit is contained in:
Jeff Young 2024-06-14 16:10:21 +01:00
parent 300313ce73
commit 4eb048bba2
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ DIALOG_SIM_FORMAT_VALUE::DIALOG_SIM_FORMAT_VALUE( wxWindow* aParent, SPICE_VALUE
m_units = aFormat->Range.Right( 2 ); m_units = aFormat->Range.Right( 2 );
SetTitle( wxString::Format( GetTitle(), _( "Frequency" ) ) ); 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 ); m_units = aFormat->Range.Right( 3 );
SetTitle( wxString::Format( GetTitle(), _( "Gain" ) ) ); SetTitle( wxString::Format( GetTitle(), _( "Gain" ) ) );

View File

@ -545,7 +545,7 @@ void SIM_PLOT_TAB::updateAxes( int aNewTraceType )
m_axis_x->SetNameAlign( mpALIGN_BOTTOM ); m_axis_x->SetNameAlign( mpALIGN_BOTTOM );
m_plotWin->AddLayer( m_axis_x ); m_plotWin->AddLayer( m_axis_x );
m_axis_y1 = new LIN_SCALE<mpScaleY>( wxEmptyString, wxT( "dBV" ), mpALIGN_LEFT ); m_axis_y1 = new LIN_SCALE<mpScaleY>( wxEmptyString, wxT( "dB" ), mpALIGN_LEFT );
m_axis_y1->SetNameAlign( mpALIGN_LEFT ); m_axis_y1->SetNameAlign( mpALIGN_LEFT );
m_plotWin->AddLayer( m_axis_y1 ); m_plotWin->AddLayer( m_axis_y1 );