X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ffull_language_tag_dialog.cc;h=a26dcc0bb81a2862ca77a2d612292e6d37effa1f;hb=924f4edb20d14bc697956254951fb87513cf2e19;hp=5b4fc589a69d670ce8945af3a5c1159af5dc0eb8;hpb=5d02ff3376c62b05f3f1bebe5277704474a39526;p=dcpomatic.git diff --git a/src/wx/full_language_tag_dialog.cc b/src/wx/full_language_tag_dialog.cc index 5b4fc589a..a26dcc0bb 100644 --- a/src/wx/full_language_tag_dialog.cc +++ b/src/wx/full_language_tag_dialog.cc @@ -173,7 +173,7 @@ private: { auto search = _search->GetValue(); _list->set_search (search.ToStdString()); - if (search.Length() > 0) { + if (search.Length() > 0 && _list->GetItemCount() > 0) { _list->EnsureVisible (0); } SearchChanged (_search->GetValue().ToStdString()); @@ -190,7 +190,7 @@ private: FullLanguageTagDialog::FullLanguageTagDialog (wxWindow* parent, dcp::LanguageTag tag) - : wxDialog (parent, wxID_ANY, "Language Tag", wxDefaultPosition, wxSize(-1, 500)) + : wxDialog (parent, wxID_ANY, _("Language Tag"), wxDefaultPosition, wxSize(-1, 500)) { _current_tag_list = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_NO_HEADER); _current_tag_list->AppendColumn ("", wxLIST_FORMAT_LEFT, 200);