From 0d8c095215fd3b19fb5c3c1c49b3acd67ca6d761 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 11 Aug 2016 14:41:10 +0200 Subject: [PATCH] Fill the signal list box when a simulation is finished --- eeschema/sim/sim_plot_frame.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index e348bff9c7..f124c9bc7d 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -248,16 +248,24 @@ void SIM_PLOT_FRAME::onSimReport( wxThreadEvent& aEvent ) void SIM_PLOT_FRAME::onSimFinished( wxThreadEvent& aEvent ) { - wxLogDebug( "Simulation finished" ); + const auto& netMapping = m_exporter->GetNetIndexMap(); + + // Fill the signals listbox + m_signals->Clear(); + + for( const auto& net : netMapping ) + { + if( net.first != "GND" ) + m_signals->Append( net.first ); + } - auto mapping = m_exporter->GetNetIndexMap(); // auto data_t = m_simulator->GetPlot( "time" ); - for( auto name : m_exporter->GetProbeList() ) + for( auto& name : m_exporter->GetProbeList() ) { char spiceName[1024]; - snprintf( spiceName, sizeof( spiceName ), "V(%d)", mapping[name] ); + snprintf( spiceName, sizeof( spiceName ), "V(%d)", netMapping.at( name ) ); //wxLogDebug( "probe %s->%s\n", (const char *) name.c_str(), spiceName ); // auto data_y = m_simulator->GetPlot( spiceName );