From 2f475d99ddd25b0742b7488a2e71c38d1137bb38 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 20 Sep 2023 17:34:16 +0100 Subject: [PATCH] Don't update signals and measurements for each refresh. We only need to do them on the final refresh. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15673 --- eeschema/sim/simulator_frame_ui.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/eeschema/sim/simulator_frame_ui.cpp b/eeschema/sim/simulator_frame_ui.cpp index 3581ba12c3..4494426950 100644 --- a/eeschema/sim/simulator_frame_ui.cpp +++ b/eeschema/sim/simulator_frame_ui.cpp @@ -2680,20 +2680,22 @@ void SIMULATOR_FRAME_UI::OnSimRefresh( bool aFinal ) updateTrace( traceInfo.first, traceInfo.second, plotTab ); } - rebuildSignalsGrid( m_filter->GetValue() ); - updateSignalsGrid(); - plotTab->GetPlotWin()->UpdateAll(); if( aFinal ) + { + rebuildSignalsGrid( m_filter->GetValue() ); + updateSignalsGrid(); + + for( int row = 0; row < m_measurementsGrid->GetNumberRows(); ++row ) + UpdateMeasurement( row ); + plotTab->ResetScales( true ); + } plotTab->GetPlotWin()->Fit(); updatePlotCursors(); - - for( int row = 0; row < m_measurementsGrid->GetNumberRows(); ++row ) - UpdateMeasurement( row ); } else if( simType == ST_OP && aFinal ) {