In the old days, the solution was simple - block the UI.
But nowadays - a background thread will search for the stuff that should appear in the UI, and adds that directly when it found something.
You can solve the problem by changing the mouse icon to the hourglass, blocking the UI for just enough time to not get any accidental clicks, and update it.
As side effect, every update now takes some time - so you have to minimize the number of updates.
But nowadays - a background thread will search for the stuff that should appear in the UI, and adds that directly when it found something.
You can solve the problem by changing the mouse icon to the hourglass, blocking the UI for just enough time to not get any accidental clicks, and update it.
As side effect, every update now takes some time - so you have to minimize the number of updates.