Accessor for ClosedCaptionsDialog.
[dcpomatic.git] / src / wx / timing_panel.cc
index f10815ca42c1ce44f5305b79ea8a4666f4c9eeb0..739cf253dbfb35d9d287f902823006e386983a30 100644 (file)
@@ -48,6 +48,7 @@ using boost::weak_ptr;
 using boost::dynamic_pointer_cast;
 using boost::optional;
 using dcp::locale_convert;
+using namespace dcpomatic;
 
 TimingPanel::TimingPanel (ContentPanel* p, weak_ptr<FilmViewer> viewer)
        /* horrid hack for apparent lack of context support with wxWidgets i18n code */
@@ -404,7 +405,6 @@ TimingPanel::trim_start_changed ()
        optional<FrameRateChange> ref_frc;
        optional<DCPTime> ref_ph;
 
-       ContentTime const trim = _trim_start->get (_parent->film()->video_frame_rate ());
 
        BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
                if (i->position() <= ph && ph < i->end(_parent->film())) {
@@ -417,6 +417,7 @@ TimingPanel::trim_start_changed ()
                        ref_ph = ph - i->position() + DCPTime (i->trim_start(), ref_frc.get());
                }
 
+               ContentTime const trim = _trim_start->get (i->video_frame_rate().get_value_or(_parent->film()->video_frame_rate()));
                i->set_trim_start (trim);
        }
 
@@ -437,8 +438,8 @@ TimingPanel::trim_end_changed ()
 
        fv->set_coalesce_player_changes (true);
 
-       ContentTime const trim = _trim_end->get (_parent->film()->video_frame_rate ());
        BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+               ContentTime const trim = _trim_end->get (i->video_frame_rate().get_value_or(_parent->film()->video_frame_rate()));
                i->set_trim_end (trim);
        }
 
@@ -447,7 +448,7 @@ TimingPanel::trim_end_changed ()
                fv->seek (_parent->film()->length() - DCPTime::from_frames(1, _parent->film()->video_frame_rate()), true);
        }
 
-       fv->set_coalesce_player_changes (true);
+       fv->set_coalesce_player_changes (false);
 }
 
 void