SIM_PLOT_FRAME: Do not update plots if the just run a different type of simulation

This commit is contained in:
Maciej Suminski 2016-08-11 14:41:39 +02:00
parent 4dc62e061b
commit 3e2061158e
1 changed files with 5 additions and 5 deletions

View File

@ -501,14 +501,14 @@ void SIM_PLOT_FRAME::onSimFinished( wxCommandEvent& aEvent )
m_signals->Append( net.first );
}
SIM_PLOT_PANEL* plotPanel = CurrentPlot();
if( plotPanel == nullptr || plotPanel->GetType() != simType )
return;
// If there are any signals plotted, update them
if( SIM_PLOT_PANEL::IsPlottable( simType ) )
{
SIM_PLOT_PANEL* plotPanel = CurrentPlot();
if( plotPanel == nullptr )
return;
for( const auto& trace : plotPanel->GetTraces() )
updatePlot( trace.second->GetSpiceName(), trace.second->GetName(), plotPanel );