+ int r = 0;
+
+ wxSizer* labels = new wxBoxSizer (wxHORIZONTAL);
+ labels->Add (_h_label, 1, wxEXPAND);
+ add_label_to_sizer (labels, _colon[0], false);
+ labels->Add (_m_label, 1, wxEXPAND);
+ add_label_to_sizer (labels, _colon[1], false);
+ labels->Add (_s_label, 1, wxEXPAND);
+ add_label_to_sizer (labels, _colon[2], false);
+ labels->Add (_f_label, 1, wxEXPAND);
+ _grid->Add (labels, wxGBPosition(r, 1));
+ ++r;
+
+ add_label_to_sizer (_grid, _position_label, true, wxGBPosition(r, 0));
+ _grid->Add (_position, wxGBPosition(r, 1));
+ ++r;
+
+ _grid->Add (_move_to_start_of_reel, wxGBPosition(r, 1));
+ ++r;
+
+ add_label_to_sizer (_grid, _full_length_label, true, wxGBPosition(r, 0));
+ _grid->Add (_full_length, wxGBPosition(r, 1));
+ ++r;
+
+ add_label_to_sizer (_grid, _trim_start_label, true, wxGBPosition(r, 0));
+ _grid->Add (_trim_start, wxGBPosition(r, 1));
+ ++r;
+
+ _grid->Add (_trim_start_to_playhead, wxGBPosition(r, 1));
+ ++r;
+
+ add_label_to_sizer (_grid, _trim_end_label, true, wxGBPosition(r, 0));
+ _grid->Add (_trim_end, wxGBPosition(r, 1));
+ ++r;
+
+ _grid->Add (_trim_end_to_playhead, wxGBPosition(r, 1));
+ ++r;
+
+ add_label_to_sizer (_grid, _play_length_label, true, wxGBPosition(r, 0));
+ _grid->Add (_play_length, wxGBPosition(r, 1));
+ ++r;
+
+ /* Completely speculative fix for #891 */
+ _grid->Layout ();
+}
+
+void
+TimingPanel::update_full_length ()
+{
+ set<DCPTime> check;
+ for (auto i: _parent->selected()) {
+ check.insert (i->full_length(_parent->film()));
+ }
+
+ if (check.size() == 1) {
+ _full_length->set (_parent->selected().front()->full_length(_parent->film()), _parent->film()->video_frame_rate());
+ } else {
+ _full_length->clear ();
+ }
+}
+
+void
+TimingPanel::update_play_length ()
+{
+ set<DCPTime> check;
+ for (auto i: _parent->selected()) {
+ check.insert (i->length_after_trim(_parent->film()));
+ }
+
+ if (check.size() == 1) {
+ _play_length->set (_parent->selected().front()->length_after_trim(_parent->film()), _parent->film()->video_frame_rate());
+ } else {
+ _play_length->clear ();
+ }
+}
+
+void
+TimingPanel::film_content_changed (int property)
+{
+ if (_film_content_changed_suspender.check(property)) {
+ return;
+ }
+
+ int const film_video_frame_rate = _parent->film()->video_frame_rate ();
+
+ /* Here we check to see if we have exactly one different value of various
+ properties, and fill the controls with that value if so.
+ */
+
+ if (property == ContentProperty::POSITION) {
+
+ set<DCPTime> check;
+ for (auto i: _parent->selected()) {
+ check.insert (i->position ());
+ }
+
+ if (check.size() == 1) {
+ _position->set (_parent->selected().front()->position(), film_video_frame_rate);
+ } else {
+ _position->clear ();
+ }
+
+ } else if (
+ property == ContentProperty::LENGTH ||
+ property == ContentProperty::VIDEO_FRAME_RATE ||
+ property == VideoContentProperty::FRAME_TYPE
+ ) {
+
+ update_full_length ();
+
+ } else if (property == ContentProperty::TRIM_START) {
+
+ set<ContentTime> check;
+ for (auto i: _parent->selected()) {
+ check.insert (i->trim_start ());
+ }
+
+ if (check.size() == 1) {
+ _trim_start->set (_parent->selected().front()->trim_start (), film_video_frame_rate);