Properly handle default value for 'track language' elements in the header editor

Fix for bug 525.
This commit is contained in:
Moritz Bunkus 2010-07-30 09:42:08 +02:00
parent 7ae9b174ed
commit 1ee34768d6
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2010-07-30 Moritz Bunkus <moritz@bunkus.org>
* mmg header editor: bug fix: If a file was loaded that did not
contain 'track language' elements and those elements were
unchanged then they would be set to 'und' upon saving. Now they're
left as-is, and when adding them to the file the drop-down box
defaults to 'eng' being selected as per Matroska default value
specifications. Fix for bug 525.
2010-07-29 Moritz Bunkus <moritz@bunkus.org>
* mkvextract, mkvinfo, mkvpropedit: new feature: Added the option

View File

@ -53,8 +53,7 @@ he_language_value_page_c::translate_ui() {
wxControl *
he_language_value_page_c::create_input_control() {
if (NULL != m_element)
m_original_value = wxU(dynamic_cast<EbmlString *>(m_element));
m_original_value = NULL != m_element ? wxU(dynamic_cast<EbmlString *>(m_element)) : wxU("eng");
m_cb_language = new wxMTX_COMBOBOX_TYPE(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN | wxCB_READONLY);