Close splash before displaying config errors/warnings.
authorCarl Hetherington <cth@carlh.net>
Fri, 3 May 2019 19:04:39 +0000 (20:04 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 10 May 2019 22:43:42 +0000 (23:43 +0100)
src/tools/dcpomatic.cc

index 7cac8e7f0ce30156364efd0ed3f67920f71410ac..73e215c045d8406e7b8e077f154df5e4a8f6705c 100644 (file)
@@ -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));
        }