summaryrefslogtreecommitdiff
path: root/src/wx/subtitle_appearance_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-01-26 19:58:56 +0000
committerCarl Hetherington <cth@carlh.net>2019-01-26 19:58:56 +0000
commit3ae7939b8926df0fd767db294e5f7a8b07f43ba1 (patch)
tree2d69397484169e0a70989aa106cb02a0cdb4aa22 /src/wx/subtitle_appearance_dialog.cc
parentbccf7c5c6ff50e25dff8e0e433b81379d8999f9b (diff)
Fix double-appearance of subtitle colour controls.
Diffstat (limited to 'src/wx/subtitle_appearance_dialog.cc')
-rw-r--r--src/wx/subtitle_appearance_dialog.cc7
1 files changed, 5 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);