diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-04-17 20:15:37 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-04-17 20:15:37 +0000 |
| commit | 5fc68cc97134b5d49479dadff05725124e56a513 (patch) | |
| tree | ae3c543b17db3bd4704c8d7c731c4628827bbda0 /src | |
| parent | 5b68916d71fbaac6c84ffc37e98d4ad42d450961 (diff) | |
Don't offer setting for line spacing with DCP subs (#1527).v2.13.148
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/text_panel.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index a9f2f91f1..95a499dfd 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -438,8 +438,10 @@ void TextPanel::setup_sensitivity () { int any_subs = 0; - /* we currently assume that FFmpeg subtitles are bitmapped */ + /* We currently assume that FFmpeg subtitles are bitmapped */ int ffmpeg_subs = 0; + /* DCP subs can't have their line spacing changed */ + int dcp_subs = 0; ContentList sel = _parent->selected_text (); BOOST_FOREACH (shared_ptr<Content> i, sel) { /* These are the content types that could include subtitles */ @@ -452,7 +454,10 @@ TextPanel::setup_sensitivity () ++ffmpeg_subs; ++any_subs; } - } else if (sc || dc || dsc) { + } else if (dc || dsc) { + ++dcp_subs; + ++any_subs; + } else if (sc) { /* XXX: in the future there could be bitmap subs from DCPs */ ++any_subs; } @@ -502,7 +507,8 @@ TextPanel::setup_sensitivity () _y_offset->Enable (!reference && any_subs > 0 && use && type == TEXT_OPEN_SUBTITLE); _x_scale->Enable (!reference && any_subs > 0 && use && type == TEXT_OPEN_SUBTITLE); _y_scale->Enable (!reference && any_subs > 0 && use && type == TEXT_OPEN_SUBTITLE); - _line_spacing->Enable (!reference && use && type == TEXT_OPEN_SUBTITLE); + /* DCP subs ignore the line spacing setting */ + _line_spacing->Enable (!reference && use && type == TEXT_OPEN_SUBTITLE && dcp_subs < any_subs); _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); |
