From 5293bcb837f4472141ff680b1cf05a42958e7217 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 21 Jan 2023 22:29:29 +0100 Subject: Don't cancel finished jobs otherwise their finished callbacks will be called again. --- src/wx/text_panel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(i)) { + if (dynamic_pointer_cast(i) && !i->finished()) { i->cancel (); } } -- cgit v1.2.3