X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fsubtitle_appearance_dialog.cc;h=76e8d8b16d00f1df23698d07257278779f43f14d;hb=b33437685e43427459e7ea752f3cd3d621878573;hp=339388be6e14e0eb25141f2efc8a49ea358599f3;hpb=4fb4b414b70cb38d405b6c3dd6c12b6a4d918d40;p=dcpomatic.git diff --git a/src/wx/subtitle_appearance_dialog.cc b/src/wx/subtitle_appearance_dialog.cc index 339388be6..76e8d8b16 100644 --- a/src/wx/subtitle_appearance_dialog.cc +++ b/src/wx/subtitle_appearance_dialog.cc @@ -40,6 +40,7 @@ using boost::shared_ptr; using boost::bind; using boost::dynamic_pointer_cast; using boost::optional; +using namespace dcpomatic; int const SubtitleAppearanceDialog::NONE = 0; int const SubtitleAppearanceDialog::OUTLINE = 1; @@ -58,7 +59,7 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr /* XXX: assuming that all FFmpeg streams have bitmap subs */ if (_stream->colours().empty()) { _job_manager_connection = JobManager::instance()->ActiveJobsChanged.connect(boost::bind(&SubtitleAppearanceDialog::active_jobs_changed, this, _1)); - JobManager::instance()->add(shared_ptr(new ExamineFFmpegSubtitlesJob(film, ff))); + _job = JobManager::instance()->add(shared_ptr(new ExamineFFmpegSubtitlesJob(film, ff))); } } @@ -107,7 +108,10 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr t->SetLabelMarkup (_("New colour")); _colour_table->Add (t, 1, wxALIGN_CENTER); - add_colours (); + shared_ptr job = _job.lock (); + if (!job || job->finished()) { + add_colours (); + } _colours_panel->SetSizer (_colour_table);