Replace misssing "if" stmt and make outer "if" catch all cases of log scales.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15174
This commit is contained in:
Jeff Young 2023-07-12 10:40:02 +01:00
parent be63e1824e
commit 0a28956cf8
1 changed files with 2 additions and 1 deletions

View File

@ -832,9 +832,10 @@ void SIM_PLOT_TAB::SetTraceData( TRACE* trace, unsigned int aPoints, const doubl
std::vector<double> x( aX, aX + aPoints );
std::vector<double> y( aY, aY + aPoints );
if( GetSimType() == ST_AC || GetSimType() == ST_SP || GetSimType() == ST_FFT )
if( dynamic_cast<LOG_SCALE<mpScaleXLog>*>( m_axis_x ) )
{
// log( 0 ) is not valid.
if( x.size() > 0 && x[0] == 0 )
{
x.erase( x.begin() );
y.erase( y.begin() );