Don't process events when recreating user charts

.. it was always rather dodgy, but caused issues when charts
   recreated on config changed (like interacts badly with
   the setUpdatesEnabled() call.

.. has a nice effect of stopping the jarring repaints too
   which were horrible when themes changed.

Fixes #4029
This commit is contained in:
Mark Liversedge
2021-08-31 10:48:16 +01:00
parent b5046f4be1
commit 4ddaa041a9

View File

@@ -386,7 +386,17 @@ GenericChart::finaliseChart()
// stack mode. I would expect this to make things
// worse but for some reason, it solves the problem.
// do not remove !!!
QApplication::processEvents();
//
// **REMOVED 31/08/2021** as it is dangerous to do
// whilst charts are being destroyed and also
// led to a problem with events being ignored
// commented out to fix:
// https://github.com/GoldenCheetah/GoldenCheetah/issues/4029
// Could not recreate the original issue with axis
// being painted/repainted in different locations
// that this originally "resolved" so seemed save to
// remove for now.
//QApplication::processEvents();
// now initialise all the newPlots
for(int i=0; i<newPlots.count(); i++) {