summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-21 00:52:42 +0100
committerCarl Hetherington <cth@carlh.net>2023-01-21 00:52:42 +0100
commita399d7c7b9239e055ba08a82b18eb68a511d1025 (patch)
treefec9bd5071d569830072495120a16b6d15222a52 /src
parentd2cf60a908766b73c13e0eed06f89892090415c3 (diff)
Fix extra widgets appearing when switching between subs and closed captions in the timing tab.
Diffstat (limited to 'src')
-rw-r--r--src/wx/language_tag_widget.cc7
-rw-r--r--src/wx/language_tag_widget.h1
2 files changed, 8 insertions, 0 deletions
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<dcp::LanguageTag> tag, boost::optional<wxString> size_to_fit = boost::none);
+ ~LanguageTagWidget();
LanguageTagWidget (LanguageTagWidget const&) = delete;
LanguageTagWidget& operator= (LanguageTagWidget const&) = delete;