X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fjob.cc;h=080d1eaf6018a5588c9d9f0c31a63c894585a4a1;hb=01791aac0b11e9f296cd31a7803e287203bd8355;hp=4969c4099c8aae60a4e7c22db6618ded9c8a1c93;hpb=8db8de91e2a5489da345fae7544753f4cb2f5ab4;p=dcpomatic.git diff --git a/src/lib/job.cc b/src/lib/job.cc index 4969c4099..080d1eaf6 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -27,6 +27,7 @@ #include "job.h" #include "util.h" #include "cross.h" +#include "ui_signaller.h" #include "i18n.h" @@ -170,8 +171,11 @@ Job::set_state (State s) boost::mutex::scoped_lock lm (_state_mutex); _state = s; - if (_state == FINISHED_OK || _state == FINISHED_ERROR) { + if (_state == FINISHED_OK || _state == FINISHED_ERROR || _state == FINISHED_CANCELLED) { _ran_for = elapsed_time (); + if (ui_signaller) { + ui_signaller->emit (boost::bind (boost::ref (Finished))); + } } }