diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-12-13 00:42:22 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-12 23:41:00 +0100 |
| commit | da46a695431d3b573924e53ac1a0163056a1a5b5 (patch) | |
| tree | 936e6ae61f3f1eac565e48babf169de1833f9ac8 /src/lib | |
| parent | 1d028a206c999bf61df84544e3aeb70cec4e505c (diff) | |
Add new interface for setting reel breaks (#2678).2678-reel-break
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/film.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index 835f3efdf..d2c73c8b5 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1616,6 +1616,23 @@ Film::check_settings_consistency () if (change_made) { Message (_("DCP-o-matic had to change your settings for referring to DCPs as OV. Please review those settings to make sure they are what you want.")); } + + if (reel_type() == ReelType::CUSTOM) { + auto boundaries = custom_reel_boundaries(); + auto too_late = std::find_if(boundaries.begin(), boundaries.end(), [this](dcpomatic::DCPTime const& time) { + return time >= length(); + }); + + if (too_late != boundaries.end()) { + if (std::distance(too_late, boundaries.end()) > 1) { + Message(_("DCP-o-matic had to remove some of your custom reel boundaries as they no longer lie within the film.")); + } else { + Message(_("DCP-o-matic had to remove one of your custom reel boundaries as it no longer lies within the film.")); + } + boundaries.erase(too_late, boundaries.end()); + set_custom_reel_boundaries(boundaries); + } + } } void |
