diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index de287f846a..73f1b321d9 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -212,14 +212,11 @@ void SIM_PLOT_FRAME::AddVoltagePlot( const wxString& aNetName ) wxString spiceName( wxString::Format( "V(%d)", netMapping.at( aNetName ) ) ); auto data_y = m_simulator->GetPlot( (const char*) spiceName.c_str() ); - wxLogDebug( "probe %s", spiceName ); - if( data_y.empty() ) return; auto data_t = m_simulator->GetPlot( "time" ); - wxLogDebug( "%lu - %lu data points", data_t.size(), data_y.size() ); SIM_PLOT_PANEL* plotPanel = static_cast( m_plotNotebook->GetCurrentPage() ); plotPanel->AddTrace( aNetName, data_t.size(), data_t.data(), data_y.data(), 0 ); } @@ -234,6 +231,15 @@ bool SIM_PLOT_FRAME::isSimulationRunning() } +void SIM_PLOT_FRAME::onSignalDblClick( wxCommandEvent& event ) +{ + int idx = m_signals->GetSelection(); + + if( idx != wxNOT_FOUND ) + AddVoltagePlot( m_signals->GetString( idx ) ); +} + + void SIM_PLOT_FRAME::onSimulate( wxCommandEvent& event ) { if( isSimulationRunning() ) diff --git a/eeschema/sim/sim_plot_frame.h b/eeschema/sim/sim_plot_frame.h index 3dee6e70ce..fe427a838e 100644 --- a/eeschema/sim/sim_plot_frame.h +++ b/eeschema/sim/sim_plot_frame.h @@ -70,6 +70,7 @@ class SIM_PLOT_FRAME : public SIM_PLOT_FRAME_BASE NewPlot(); } + void onSignalDblClick( wxCommandEvent& event ) override; void onSimulate( wxCommandEvent& event ) override; void onPlaceProbe( wxCommandEvent& event ) override;