Prevent setting of negative trims by changing play length.
authorCarl Hetherington <cth@carlh.net>
Wed, 27 Jun 2018 19:21:29 +0000 (20:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 27 Jun 2018 19:21:29 +0000 (20:21 +0100)
src/wx/timing_panel.cc

index 653e446..4006c5d 100644 (file)
@@ -395,7 +395,7 @@ TimingPanel::play_length_changed ()
        BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
                FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
                i->set_trim_end (
-                       ContentTime (i->full_length() - play_length, frc) - i->trim_start ()
+                       ContentTime (max(DCPTime(), i->full_length() - play_length), frc) - i->trim_start ()
                        );
        }
 }