Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes reload when changing tab issue (eteran#112)! (eteran#227)
* Fixes issue eteran#112! So the problem was that by checking for file changes in the focus event itself, we are popping up the messagebox BEFORE the focus event is complete. And the update caused by the focus event happens AFTER it is complete. So the solution is to NOT check for changes inside the focus event, but instead to schedule a check for the immediate future. (Done via a single shot timer with a 0 timeout). Inspired by kernel "bottom half interrupt handlers". This allows the windowing system to complete processes of existing events, including the repaint and then will immediately check for changes. Woot! * Following @sjtringali's advice, this is a bit of a cleaner solution since it doesn't need a `QTimer` but has the same effect
- Loading branch information