2015-07-28 c.hetherington <cth@carlh.net>
+ * Stop forward-frame button going off the end of the film.
+
* Notice when content is modified and offer to save the project
on closing DCP-o-matic.
void
FilmViewer::forward_clicked ()
{
- get (_position + DCPTime::from_frames (1, _film->video_frame_rate ()), true);
+ DCPTime p = _position + DCPTime::from_frames (1, _film->video_frame_rate ());
+ if (p >= _film->length ()) {
+ p = _position;
+ }
+
+ get (p, true);
update_position_label ();
update_position_slider ();
}