Disable subtitle view/font buttons with FFmpeg content (#1236).
authorCarl Hetherington <cth@carlh.net>
Sun, 6 Jan 2019 23:37:39 +0000 (23:37 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 6 Jan 2019 23:37:39 +0000 (23:37 +0000)
src/wx/text_panel.cc

index ed49d8484d4575cfb534201f82701ed7472948b6..3c5abcefc2453d723c6cb4baf4f92a30eea2881f 100644 (file)
@@ -480,8 +480,9 @@ TextPanel::setup_sensitivity ()
        _dcp_track->Enable (!reference && any_subs > 0 && use && type == TEXT_CLOSED_CAPTION);
        _language->Enable (!reference && any_subs > 0 && use && type == TEXT_OPEN_SUBTITLE);
        _stream->Enable (!reference && ffmpeg_subs == 1);
        _dcp_track->Enable (!reference && any_subs > 0 && use && type == TEXT_CLOSED_CAPTION);
        _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);
+       /* Ideally we would check here to see if the FFmpeg content has "string" subs (i.e. not bitmaps) */
+       _text_view_button->Enable (!reference && any_subs > 0 && ffmpeg_subs == 0);
+       _fonts_dialog_button->Enable (!reference && any_subs > 0 && ffmpeg_subs == 0 && type == TEXT_OPEN_SUBTITLE);
        _appearance_dialog_button->Enable (!reference && any_subs > 0 && use && type == TEXT_OPEN_SUBTITLE);
 }
 
        _appearance_dialog_button->Enable (!reference && any_subs > 0 && use && type == TEXT_OPEN_SUBTITLE);
 }