From: Carl Hetherington Date: Fri, 20 Jan 2023 23:52:42 +0000 (+0100) Subject: Fix extra widgets appearing when switching between subs and closed captions in the... X-Git-Tag: v2.16.41~5 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=a399d7c7b9239e055ba08a82b18eb68a511d1025 Fix extra widgets appearing when switching between subs and closed captions in the timing tab. --- diff --git a/src/wx/language_tag_widget.cc b/src/wx/language_tag_widget.cc index 1a6f3fabc..88923da15 100644 --- a/src/wx/language_tag_widget.cc +++ b/src/wx/language_tag_widget.cc @@ -57,6 +57,13 @@ LanguageTagWidget::LanguageTagWidget (wxWindow* parent, wxString tooltip, option } +LanguageTagWidget::~LanguageTagWidget() +{ + _language->Destroy(); + _edit->Destroy(); +} + + void LanguageTagWidget::edit () { diff --git a/src/wx/language_tag_widget.h b/src/wx/language_tag_widget.h index 1b97d03c7..ff3eeb727 100644 --- a/src/wx/language_tag_widget.h +++ b/src/wx/language_tag_widget.h @@ -37,6 +37,7 @@ class LanguageTagWidget { public: LanguageTagWidget (wxWindow* parent, wxString tooltip, boost::optional tag, boost::optional size_to_fit = boost::none); + ~LanguageTagWidget(); LanguageTagWidget (LanguageTagWidget const&) = delete; LanguageTagWidget& operator= (LanguageTagWidget const&) = delete;