Only enable text language for open subs.
[dcpomatic.git] / src / wx / text_panel.cc
index ef604f787579671e6a5853c40197b1ed7b1d636f..164b9dd7dccbe42d2780b95d2068577ff87d1bf8 100644 (file)
@@ -210,7 +210,7 @@ TextPanel::update_dcp_track_selection ()
                ++n;
        }
 
-       if (many) {
+       if (!selected || many) {
                _dcp_track->SetSelection (wxNOT_FOUND);
        }
 }
@@ -325,6 +325,7 @@ TextPanel::film_content_changed (int property)
                        _type->SetSelection (0);
                }
                setup_sensitivity ();
+               update_dcp_track_selection ();
        } else if (property == TextContentProperty::BURN) {
                checked_set (_burn, text ? text->burn() : false);
        } else if (property == TextContentProperty::X_OFFSET) {
@@ -442,7 +443,7 @@ TextPanel::setup_sensitivity ()
        _y_scale->Enable (!reference && any_subs > 0 && use && type == TEXT_OPEN_SUBTITLE);
        _line_spacing->Enable (!reference && use && type == TEXT_OPEN_SUBTITLE);
        _dcp_track->Enable (!reference && any_subs > 0 && use && type == TEXT_CLOSED_CAPTION);
-       _language->Enable (!reference && any_subs > 0 && use);
+       _language->Enable (!reference && any_subs > 0 && use && type == TEXT_OPEN_SUBTITLE);
        _stream->Enable (!reference && ffmpeg_subs == 1);
        _text_view_button->Enable (!reference);
        _fonts_dialog_button->Enable (!reference && type == TEXT_OPEN_SUBTITLE);