Merge master.
authorCarl Hetherington <cth@carlh.net>
Mon, 17 Mar 2014 11:25:32 +0000 (11:25 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 17 Mar 2014 11:25:32 +0000 (11:25 +0000)
1  2 
ChangeLog
src/wx/film_viewer.cc

diff --cc ChangeLog
index e70b7373e8d8059f212a3211b9aaddbbf3a6303a,5a99d30ff0a76a1525db6738a009684081a72bc8..2edfe0e121e482b7af60bd004a583fe869787501
+++ b/ChangeLog
@@@ -1,7 -1,9 +1,13 @@@
 +2014-03-07  Carl Hetherington  <cth@carlh.net>
 +
 +      * Add subtitle view.
 +
+ 2014-03-17  Carl Hetherington  <cth@carlh.net>
+       * Improve behaviour of the position slider at the end of films.
+       * Version 1.66.2 released.
  2014-03-17  Carl Hetherington  <cth@carlh.net>
  
        * Improve appearance of config dialog on OS X.
index 7e1b618119eec5367b0374fa09239886a3f12181,ce5eab00e1db8e8f0bd4bb7e707fe470e59bc7cb..b0bc65750f71ea8e202d973a07792a858c814c13
@@@ -221,14 -219,13 +221,19 @@@ voi
  FilmViewer::slider_moved ()
  {
        if (_film && _player) {
 -              Time t = _slider->GetValue() * _film->length() / 4096;
 -              /* Ensure that we hit the end of the film at the end of the slider */
 -              if (t >= _film->length ()) {
 -                      t = _film->length() - _film->video_frames_to_time (1);
 +              try {
++                      Time t = _slider->GetValue() * _film->length() / 4096;
++                      /* Ensure that we hit the end of the film at the end of the slider */
++                      if (t >= _film->length ()) {
++                              t = _film->length() - _film->video_frames_to_time (1);
++                      }
 +                      _player->seek (DCPTime (_film->length().get() * _slider->GetValue() / 4096), false);
 +                      fetch_next_frame ();
 +              } catch (OpenFileError& e) {
 +                      /* There was a problem opening a content file; we'll let this slide as it
 +                         probably means a missing content file, which we're already taking care of.
 +                      */
                }
 -              _player->seek (t, false);
 -              fetch_next_frame ();
        }
  }