Fix job ordering when sending notification emails (more of #1286).
[dcpomatic.git] / src / wx / job_view.cc
index d0086ff81aae2acbbe332164f36489355b5f9a0f..43d6f2fedd9ca90f44d4ec3e191fb673af560f2f 100644 (file)
@@ -142,7 +142,7 @@ JobView::finished ()
                        string body = Config::instance()->notification_email();
                        boost::algorithm::replace_all (body, "$JOB_NAME", _job->name());
                        boost::algorithm::replace_all (body, "$JOB_STATUS", _job->status());
-                       JobManager::instance()->add (shared_ptr<Job> (new SendNotificationEmailJob (body)));
+                       JobManager::instance()->add_after (_job, shared_ptr<Job> (new SendNotificationEmailJob (body)));
                }
        }
 }