Don't wait for unused events

We only need the UI update and mouse/keyboard while updating our DRC
window.  Waiting for other events gets into a race condition with the
schematic editor that can cause a hang

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17003

(cherry picked from commit 14667e2033)
This commit is contained in:
Seth Hillbrand 2024-03-01 15:19:13 -08:00
parent a7c09964ba
commit 22f66fdf2f
1 changed files with 2 additions and 1 deletions

View File

@ -40,6 +40,7 @@
#include <tools/pcb_actions.h>
#include <wildcards_and_files_ext.h>
#include <pcb_marker.h>
#include <pgm_base.h>
#include <wx/filedlg.h>
#include <wx/wupdlock.h>
#include <widgets/appearance_controls.h>
@ -209,7 +210,7 @@ bool DIALOG_DRC::updateUI()
double cur = alg::clamp( 0.0, (double) m_progress.load() / m_maxProgress, 1.0 );
m_gauge->SetValue( KiROUND( cur * 1000.0 ) );
wxSafeYield( this );
Pgm().App().SafeYieldFor( this, wxEVT_CATEGORY_NATIVE_EVENTS );
return !m_cancelled;
}