Skip to content

Commit

Permalink
Force a repaint of the splash screen.
Browse files Browse the repository at this point in the history
Ensures the image is painted promptly and does not wait for the event loop
to start. If the ApplicationWindow constructor takes too long then
the event loop paint events don't start and the image only gets painted
at the end.
Refs #10741
  • Loading branch information
martyngigg committed Dec 10, 2014
1 parent 03a70e1 commit 2570e59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Code/Mantid/MantidPlot/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ int main( int argc, char ** argv )
const QString versionInfo(Mantid::Kernel::MantidVersion::version());
splash.showMessage("Release: " + releaseDateTime + " (Version " + versionInfo + ")", Qt::AlignLeft | Qt::AlignBottom);
splash.show();
// If we take too long to get to the event loop then box starts out gray so ensure
// it is painted before doing any heavy lifting like the ApplicationWindow init
splash.repaint();
app.processEvents();

bool factorySettings = false;
Expand Down

0 comments on commit 2570e59

Please sign in to comment.