From: Carl Hetherington Date: Thu, 30 May 2013 12:02:31 +0000 (+0100) Subject: Count frame number from 1. Move panel refresh to after getting the new frame on... X-Git-Tag: v2.0.48~1337^2~331^2~19 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=c7f73ab2c9e1a642f40f922303a63599aeadb30a;p=dcpomatic.git 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). --- 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 image, bool, shared_ptrframes_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);