summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-10-13 21:21:27 +0200
committerCarl Hetherington <cth@carlh.net>2021-10-13 21:22:24 +0200
commit1e419dedd828490498b501e86e67654461cc9488 (patch)
treeb76d3e93efc00268356664f9cc3bf0c3f9b504af /src
parent3c9b646e2ea130e9ab737bb3e751f1705fc7331c (diff)
Don't allow negative trims to be set up via changes to play length (#2105).v2.15.168
Diffstat (limited to 'src')
-rw-r--r--src/wx/timing_panel.cc5
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()));
}
}