diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-10-13 21:21:27 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-10-13 21:21:27 +0200 |
| commit | 58db838562bad82981cd454aeed83186c0c7bfc2 (patch) | |
| tree | a67c13557bd3ecbd3dc90d5169003752247475b0 | |
| parent | 040060f2f63828df0b3cc1a3aa011ad05de668bf (diff) | |
Don't allow negative trims to be set up via changes to play length (#2105).
| -rw-r--r-- | src/wx/timing_panel.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc index 1f2928e01..31b160542 100644 --- a/src/wx/timing_panel.cc +++ b/src/wx/timing_panel.cc @@ -412,9 +412,8 @@ TimingPanel::play_length_changed () Suspender::Block bl = _film_content_changed_suspender.block (); for (auto i: _parent->selected()) { FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ()); - i->set_trim_end ( - ContentTime (max(DCPTime(), i->full_length(_parent->film()) - play_length), frc) - i->trim_start() - ); + auto dcp = max(DCPTime(), i->full_length(_parent->film()) - play_length); + i->set_trim_end (max(ContentTime(), ContentTime(dcp, frc) - i->trim_start())); } } |
