diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/subtitle_appearance_dialog.cc | 7 | ||||
| -rw-r--r-- | src/wx/subtitle_appearance_dialog.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/wx/subtitle_appearance_dialog.cc b/src/wx/subtitle_appearance_dialog.cc index 339388be6..ad4c03850 100644 --- a/src/wx/subtitle_appearance_dialog.cc +++ b/src/wx/subtitle_appearance_dialog.cc @@ -58,7 +58,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<Job>(new ExamineFFmpegSubtitlesJob(film, ff))); + _job = JobManager::instance()->add(shared_ptr<Job>(new ExamineFFmpegSubtitlesJob(film, ff))); } } @@ -107,7 +107,10 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr t->SetLabelMarkup (_("<b>New colour</b>")); _colour_table->Add (t, 1, wxALIGN_CENTER); - add_colours (); + shared_ptr<Job> job = _job.lock (); + if (!job || job->finished()) { + add_colours (); + } _colours_panel->SetSizer (_colour_table); diff --git a/src/wx/subtitle_appearance_dialog.h b/src/wx/subtitle_appearance_dialog.h index ed0360e4c..0b3c66132 100644 --- a/src/wx/subtitle_appearance_dialog.h +++ b/src/wx/subtitle_appearance_dialog.h @@ -33,6 +33,7 @@ class FFmpegSubtitleStream; class wxCheckBox; class wxWidget; class Film; +class Job; class SubtitleAppearanceDialog : public wxDialog { @@ -76,6 +77,8 @@ private: boost::signals2::scoped_connection _content_connection; boost::signals2::scoped_connection _job_manager_connection; + boost::weak_ptr<Job> _job; + static int const NONE; static int const OUTLINE; static int const SHADOW; |
