Potentially nicer version of previous.
authorCarl Hetherington <cth@carlh.net>
Wed, 3 Jun 2015 12:29:50 +0000 (13:29 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 3 Jun 2015 12:29:50 +0000 (13:29 +0100)
test/test.cc

index 7725045632380ee4191f22e9309a734bf86530fa..4eafe4ed0d63220a4328bb334bdef594fdceb5ad 100644 (file)
@@ -288,6 +288,7 @@ wait_for_jobs ()
        while (jm->work_to_do ()) {
                signal_manager->ui_idle ();
        }
+       
        if (jm->errors ()) {
                int N = 0;
                for (list<shared_ptr<Job> >::iterator i = jm->_jobs.begin(); i != jm->_jobs.end(); ++i) {
@@ -306,16 +307,11 @@ wait_for_jobs ()
                }
        }
 
-       /* Wait for a little to make sure that examine-content jobs have had time to
-          signal the UI to do the content addition.
-          XXX: nasty
-       */
-       dcpomatic_sleep (1);
-
        signal_manager->ui_idle ();
 
-       /* Discard all jobs so we lose any we just reported an error in */
-       JobManager::drop ();
+       if (jm->errors ()) {
+               JobManager::drop ();
+       }
 }
 
 void