+
+void
+TimingPanel::trim_start_to_playhead_clicked ()
+{
+ DCPTime const ph = _viewer->position ();
+ BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+ if (i->position() < ph && ph < i->end ()) {
+ FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
+ i->set_trim_start (i->trim_start() + ContentTime (ph - i->position (), frc));
+ }
+ }
+}
+
+void
+TimingPanel::trim_end_to_playhead_clicked ()
+{
+ DCPTime const ph = _viewer->position ();
+ BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+ if (i->position() < ph && ph < i->end ()) {
+ FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
+ i->set_trim_end (ContentTime (i->position() + i->full_length() - ph, frc) - i->trim_start());
+ }
+
+ }
+}