Fix failure to remove markers when the checkbox is unticked.
[dcpomatic.git] / src / wx / closed_captions_dialog.cc
index 491a6fb1e4a8dfeb32e76dbcee2130635ef20105..7fcfc0808667a4d0d0271cda359044da98c5a088 100644 (file)
@@ -201,7 +201,7 @@ ClosedCaptionsDialog::update ()
                auto j = to_show.begin();
                int k = 0;
                while (j != to_show.end() && k < MAX_CLOSED_CAPTION_LINES) {
-                       _lines[k] = j->text();
+                       _lines[k] = std_to_wx (j->text());
                        ++j;
                        ++k;
                }
@@ -249,7 +249,7 @@ ClosedCaptionsDialog::update_tracks (shared_ptr<const Film> film)
 
        _track->Clear ();
        for (auto const& i: _tracks) {
-               _track->Append (std_to_wx(String::compose("%1 (%2)", i.name, i.language)));
+               _track->Append (std_to_wx(String::compose("%1 (%2)", i.name, i.language ? i.language->to_string() : wx_to_std(_("Unknown")))));
        }
 
        if (_track->GetCount() > 0) {