Try to stop strange subtitle area displays by preventing re-entrancy to try_to_load_a...
authorCarl Hetherington <cth@carlh.net>
Wed, 26 Aug 2020 09:40:47 +0000 (11:40 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 26 Aug 2020 09:40:47 +0000 (11:40 +0200)
src/wx/text_panel.cc

index 0f84664..a2ae72a 100644 (file)
@@ -781,6 +781,10 @@ TextPanel::outline_subtitles_changed ()
 void
 TextPanel::try_to_load_analysis ()
 {
+       if (_loading_analysis) {
+               return;
+       }
+
        _loading_analysis = true;
        setup_sensitivity ();
        _analysis.reset ();
@@ -879,6 +883,7 @@ TextPanel::analysis_finished ()
                return;
        }
 
+       _loading_analysis = false;
        try_to_load_analysis ();
 }