summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-03-16 01:48:44 +0100
committerCarl Hetherington <cth@carlh.net>2023-03-16 22:45:19 +0100
commitc7044a1b444c2e5e7659bf5d34ed5ac73f5a6271 (patch)
tree142862dfac75e9ba9a59b8a64be633dcda7d7a83
parenta6c4b4fa16d9c6597e362044b875f3d6df80753f (diff)
Cleanup: move variable assignment that happens in every branch.
-rw-r--r--src/wx/text_panel.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc
index fa039dbde..2fdcbb51f 100644
--- a/src/wx/text_panel.cc
+++ b/src/wx/text_panel.cc
@@ -886,9 +886,10 @@ TextPanel::clear_outline_subtitles ()
void
TextPanel::analysis_finished ()
{
+ _loading_analysis = false;
+
auto content = _analysis_content.lock ();
if (!content) {
- _loading_analysis = false;
setup_sensitivity ();
return;
}
@@ -899,12 +900,10 @@ TextPanel::analysis_finished ()
*/
error_dialog (_parent->window(), _("Could not analyse subtitles."));
clear_outline_subtitles ();
- _loading_analysis = false;
setup_sensitivity ();
return;
}
- _loading_analysis = false;
try_to_load_analysis ();
}