Browse Source

eeschema: two fixes for simulation tuners

- fix irrelevant warning message box when tuners moved
  too quickly and simulation was slow
- fix for rerun simulation when tuning and result tab was changed
7.0
Sylwester Kocjan 4 years ago
committed by Mikolaj Wielgus
parent
commit
05fbe47a1b
  1. 12
      eeschema/sim/sim_plot_frame.cpp
  2. 2
      eeschema/sim/sim_plot_frame.h

12
eeschema/sim/sim_plot_frame.cpp

@ -1778,16 +1778,25 @@ void SIM_PLOT_FRAME::onSimFinished( wxCommandEvent& aEvent )
}
}
m_lastSimPlot = plotPanelWindow;
m_simFinished = true;
}
void SIM_PLOT_FRAME::onSimUpdate( wxCommandEvent& aEvent )
{
static bool updateInProgress = false;
// skip update when events are triggered too often and previous call didn't end yet
if( updateInProgress )
return;
updateInProgress = true;
if( m_simulator->IsRunning() )
m_simulator->Stop();
if( GetCurrentPlot() != m_lastSimPlot )
if( getCurrentPlotWindow() != m_lastSimPlot )
{
// We need to rerun simulation, as the simulator currently stores
// results for another plot
@ -1810,6 +1819,7 @@ void SIM_PLOT_FRAME::onSimUpdate( wxCommandEvent& aEvent )
else
DisplayErrorMessage( this, _( "Another simulation is already running." ) );
}
updateInProgress = false;
}

2
eeschema/sim/sim_plot_frame.h

@ -367,7 +367,7 @@ private:
};
///< Panel that was used as the most recent one for simulations
SIM_PLOT_PANEL* m_lastSimPlot;
SIM_PANEL_BASE* m_lastSimPlot;
///< imagelists used to add a small colored icon to signal names
///< and cursors name, the same color as the corresponding signal traces

Loading…
Cancel
Save