Disable content audio selector if there is none (#41).
authorCarl Hetherington <cth@carlh.net>
Fri, 8 Mar 2013 20:11:32 +0000 (20:11 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 8 Mar 2013 20:11:32 +0000 (20:11 +0000)
src/wx/film_editor.cc

index dcd18c97f4d0385a95830f3bd673e4bc8cba2e0d..82c8a76a81bb15e46759980af4a3c4850b68e16e 100644 (file)
@@ -1129,7 +1129,7 @@ FilmEditor::setup_subtitle_control_sensitivity ()
 void
 FilmEditor::setup_audio_control_sensitivity ()
 {
-       _use_content_audio->Enable (_generally_sensitive);
+       _use_content_audio->Enable (_generally_sensitive && _film && !_film->content_audio_streams().empty());
        _use_external_audio->Enable (_generally_sensitive);
        
        bool const source = _generally_sensitive && _use_content_audio->GetValue();
@@ -1224,7 +1224,7 @@ FilmEditor::subtitle_stream_changed (wxCommandEvent &)
 void
 FilmEditor::setup_audio_details ()
 {
-       if (!_film->audio_stream()) {
+       if (!_film->content_audio_stream()) {
                _audio->SetLabel (wxT (""));
        } else {
                stringstream s;