From be3402b1fa27c9c35b043fd88cef93a88b17c6de Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 3 May 2019 20:04:39 +0100 Subject: [PATCH] Close splash before displaying config errors/warnings. --- src/tools/dcpomatic.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 7cac8e7f0..73e215c04 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -1511,10 +1511,7 @@ private: _frame = new DOMFrame (_("DCP-o-matic")); SetTopWindow (_frame); _frame->Maximize (); - if (_splash) { - _splash->Destroy (); - _splash = 0; - } + close_splash (); if (!Config::instance()->nagged(Config::NAG_INITIAL_SETUP)) { InitialSetupDialog* d = new InitialSetupDialog (); @@ -1650,13 +1647,23 @@ private: } } + void close_splash () + { + if (_splash) { + _splash->Destroy (); + _splash = 0; + } + } + void config_failed_to_load () { + close_splash (); message_dialog (_frame, _("The existing configuration failed to load. Default values will be used instead. These may take a short time to create.")); } void config_warning (string m) { + close_splash (); message_dialog (_frame, std_to_wx (m)); } -- 2.30.2