summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/wx/film_viewer.cc7
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b0d7898dc..6628ef454 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
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.
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 6f29bcc33..1badc0282 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -418,7 +418,12 @@ FilmViewer::back_clicked ()
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 ();
}