diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index 7428d7ced4..d0dfe47d62 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -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; }; diff --git a/eeschema/sim/sim_plot_panel.cpp b/eeschema/sim/sim_plot_panel.cpp index edb747183c..8a041f3fde 100644 --- a/eeschema/sim/sim_plot_panel.cpp +++ b/eeschema/sim/sim_plot_panel.cpp @@ -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 ); } diff --git a/eeschema/sim/sim_plot_panel.h b/eeschema/sim/sim_plot_panel.h index 15d680cc80..6a0bc3d254 100644 --- a/eeschema/sim/sim_plot_panel.h +++ b/eeschema/sim/sim_plot_panel.h @@ -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.