diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-05-30 13:02:31 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-05-30 13:02:31 +0100 |
| commit | c7f73ab2c9e1a642f40f922303a63599aeadb30a (patch) | |
| tree | eb0f495ec4e84922380949633b8b7958f413703b /src | |
| parent | c1d35fc679f63d8a2f80287b6c6a9af984a449f5 (diff) | |
Count frame number from 1. Move panel refresh to after getting the new frame on a timer event; this means that the view is refreshed after stop (and so displays the right frame).
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/film_viewer.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index a5920b4bb..6845031cf 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -207,9 +207,6 @@ FilmViewer::timer (wxTimerEvent &) return; } - _panel->Refresh (); - _panel->Update (); - get_frame (); if (_film->length()) { @@ -218,6 +215,9 @@ FilmViewer::timer (wxTimerEvent &) _slider->SetValue (new_slider_position); } } + + _panel->Refresh (); + _panel->Update (); } @@ -413,7 +413,8 @@ FilmViewer::process_video (shared_ptr<const Image> image, bool, shared_ptr<Subti _got_frame = true; double const fps = _decoders.video->frames_per_second (); - _frame->SetLabel (wxString::Format (wxT("%d"), int (rint (t * fps)))); + /* Count frame number from 1 ... not sure if this is the best idea */ + _frame->SetLabel (wxString::Format (wxT("%d"), int (rint (t * fps)) + 1)); double w = t; int const h = (w / 3600); |
