diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-21 22:29:29 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-27 14:47:25 +0100 |
| commit | 5293bcb837f4472141ff680b1cf05a42958e7217 (patch) | |
| tree | e3ed28d39ea877ee1485ad4c258d3bff93dd3db7 | |
| parent | 051dbf3c6b1518326ed6605df724c94d6cbee344 (diff) | |
Don't cancel finished jobs otherwise their finished callbacks will be called again.
| -rw-r--r-- | src/wx/text_panel.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index 95c422fd0..fa039dbde 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -826,7 +826,7 @@ TextPanel::try_to_load_analysis () if (!boost::filesystem::exists(path)) { for (auto i: JobManager::instance()->get()) { - if (dynamic_pointer_cast<AnalyseSubtitlesJob>(i)) { + if (dynamic_pointer_cast<AnalyseSubtitlesJob>(i) && !i->finished()) { i->cancel (); } } |
