We don't need "(gain)" or "(phase)" in names any more.

Fixes https://gitlab.com/kicad/code/kicad/issues/14140
This commit is contained in:
Jeff Young 2023-03-02 00:37:12 +00:00
parent 190ee58ccf
commit 63a545ebfd
3 changed files with 11 additions and 12 deletions

View File

@ -798,8 +798,8 @@ void SIM_PLOT_FRAME::rebuildSignalsGrid( wxString aFilter )
if( matcher.Find( signal, matches, offset ) && offset == 0 )
{
int traceType = SPT_UNKNOWN;
wxString vecName = vectorNameFromSignalName( signal, &traceType );
TRACE* trace = plotPanel ? plotPanel->GetTrace( vecName, traceType ) : nullptr;
wxString vectorName = vectorNameFromSignalName( signal, &traceType );
TRACE* trace = plotPanel ? plotPanel->GetTrace( vectorName, traceType ) : nullptr;
m_signalsGrid->AppendRows( 1 );
m_signalsGrid->SetCellValue( row, COL_SIGNAL_NAME, signal );
@ -1139,7 +1139,6 @@ wxString SIM_PLOT_FRAME::vectorNameFromSignalName( const wxString& aSignalName,
if( aTraceType )
*aTraceType |= type;
suffix = candidate;
break;
}
}
@ -1147,10 +1146,10 @@ wxString SIM_PLOT_FRAME::vectorNameFromSignalName( const wxString& aSignalName,
for( const auto& [ id, signal ] : m_userDefinedSignals )
{
if( name == signal )
return vectorNameFromSignalId( id ) + suffix;
return vectorNameFromSignalId( id );
}
return name + suffix;
return name;
};

View File

@ -690,9 +690,9 @@ void SIM_PLOT_PANEL::UpdateTraceStyle( TRACE* trace )
}
TRACE* SIM_PLOT_PANEL::AddTrace( const wxString& aVecName, int aType )
TRACE* SIM_PLOT_PANEL::AddTrace( const wxString& aVectorName, int aType )
{
TRACE* trace = GetTrace( aVecName, aType );
TRACE* trace = GetTrace( aVectorName, aType );
if( !trace )
{
@ -721,10 +721,10 @@ TRACE* SIM_PLOT_PANEL::AddTrace( const wxString& aVecName, int aType )
}
}
trace = new TRACE( aVecName, (SIM_TRACE_TYPE) aType );
trace = new TRACE( aVectorName, (SIM_TRACE_TYPE) aType );
trace->SetTraceColour( m_colors.GenerateColor( m_traces ) );
UpdateTraceStyle( trace );
m_traces[ getTraceId( aVecName, aType ) ] = trace;
m_traces[ getTraceId( aVectorName, aType ) ] = trace;
m_plotWin->AddLayer( (mpLayer*) trace );
}

View File

@ -277,7 +277,7 @@ public:
return m_plotWin;
}
TRACE* AddTrace( const wxString& aVecName, int aType );
TRACE* AddTrace( const wxString& aVectorName, int aType );
void SetTraceData( TRACE* aTrace, unsigned int aPoints, const double* aX, const double* aY );
@ -285,9 +285,9 @@ public:
void DeleteTrace( TRACE* aTrace );
private:
wxString getTraceId( const wxString& aVecName, int aType ) const
wxString getTraceId( const wxString& aVectorName, int aType ) const
{
return wxString::Format( wxS( "%s%d" ), aVecName, aType & SPT_Y_AXIS_MASK );
return wxString::Format( wxS( "%s%d" ), aVectorName, aType & SPT_Y_AXIS_MASK );
}
///< @brief Construct the plot axes for DC simulation plot.