projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3c9b646
)
Don't allow negative trims to be set up via changes to play length (#2105).
v2.15.168
author
Carl Hetherington
<cth@carlh.net>
Wed, 13 Oct 2021 19:21:27 +0000
(21:21 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 13 Oct 2021 19:22:24 +0000
(21:22 +0200)
src/wx/timing_panel.cc
patch
|
blob
|
history
diff --git
a/src/wx/timing_panel.cc
b/src/wx/timing_panel.cc
index 1f2928e018c588c33f7bc0807ff692c62dda92c4..31b1605421c6258e25a2de8bf6a6bb744d1eb40e 100644
(file)
--- 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 ());
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()));
}
}
}
}