Fix flickering of timecode values on Windows.
authorCarl Hetherington <cth@carlh.net>
Tue, 4 Aug 2020 21:40:45 +0000 (23:40 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 4 Aug 2020 21:40:45 +0000 (23:40 +0200)
src/wx/controls.cc

index 5651dc8f26740bd1d859d91661bde16001abaf2a..caa0dc823974a3882511b19b99dd278bd203bed9 100644 (file)
@@ -259,15 +259,15 @@ void
 Controls::update_position_label ()
 {
        if (!_film) {
-               _frame_number->SetLabel ("0");
-               _timecode->SetLabel ("0:0:0.0");
+               checked_set (_frame_number, wxT("0"));
+               checked_set (_timecode, wxT("0:0:0.0"));
                return;
        }
 
        double const fps = _film->video_frame_rate ();
        /* Count frame number from 1 ... not sure if this is the best idea */
-       _frame_number->SetLabel (wxString::Format (wxT("%ld"), lrint (_viewer->position().seconds() * fps) + 1));
-       _timecode->SetLabel (time_to_timecode (_viewer->position(), fps));
+       checked_set (_frame_number, wxString::Format (wxT("%ld"), lrint (_viewer->position().seconds() * fps) + 1));
+       checked_set (_timecode, time_to_timecode (_viewer->position(), fps));
 }
 
 void