KiCad PCB EDA Suite
Loading...
Searching...
No Matches
wx_event_utils.h File Reference
#include <wx/evtloop.h>

Go to the source code of this file.

Functions

void DrainPendingEvents (long aCategories=wxEVT_CATEGORY_TIMER)
 Drain pending events of the given categories from the active event loop.
 

Function Documentation

◆ DrainPendingEvents()

void DrainPendingEvents ( long aCategories = wxEVT_CATEGORY_TIMER)
inline

Drain pending events of the given categories from the active event loop.

During long-running operations that call progress-dialog Update() frequently, wxWidgets can accumulate a backlog of timer events that makes the UI sluggish after the operation completes. Calling this after each Update() prevents the backlog from building up.

See https://github.com/wxWidgets/wxWidgets/issues/26192

Parameters
aCategoriesEvent categories to yield for (default wxEVT_CATEGORY_TIMER).

Definition at line 40 of file wx_event_utils.h.

Referenced by APP_PROGRESS_DIALOG::Update(), GAUGE_PROGRESS_REPORTER::updateUI(), and WX_PROGRESS_REPORTER::updateUI().