diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-11-05 23:51:20 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-01-08 21:56:47 +0100 |
| commit | 694a9f48880efd428c8137e975de3581ad0a75a9 (patch) | |
| tree | 577296e45dbfd2e0c93e2d55ab82d4909a9a6ae5 /src/wx/controls.cc | |
| parent | 15e82df97cc99b94a7028313dff4eba213ecd84d (diff) | |
Remove PositionChanged in favour of consumers having their own GUI-thread timers.
Diffstat (limited to 'src/wx/controls.cc')
| -rw-r--r-- | src/wx/controls.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wx/controls.cc b/src/wx/controls.cc index b173b43ff..71af4e8cf 100644 --- a/src/wx/controls.cc +++ b/src/wx/controls.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2018 Carl Hetherington <cth@carlh.net> + Copyright (C) 2018-2019 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -67,6 +67,7 @@ Controls::Controls (wxWindow* parent, shared_ptr<FilmViewer> viewer, bool editor , _forward_button (new Button (this, wxT(">"))) , _frame_number (new StaticText (this, wxT(""))) , _timecode (new StaticText (this, wxT(""))) + , _timer (this) { _v_sizer = new wxBoxSizer (wxVERTICAL); SetSizer (_v_sizer); @@ -137,10 +138,12 @@ Controls::Controls (wxWindow* parent, shared_ptr<FilmViewer> viewer, bool editor _jump_to_selected->SetValue (Config::instance()->jump_to_selected ()); } - _viewer->PositionChanged.connect (boost::bind(&Controls::position_changed, this)); _viewer->Started.connect (boost::bind(&Controls::started, this)); _viewer->Stopped.connect (boost::bind(&Controls::stopped, this)); + Bind (wxEVT_TIMER, boost::bind(&Controls::update_position, this)); + _timer.Start (80, wxTIMER_CONTINUOUS); + set_film (_viewer->film()); setup_sensitivity (); @@ -172,7 +175,7 @@ Controls::stopped () } void -Controls::position_changed () +Controls::update_position () { if (!_slider_being_moved) { update_position_label (); |
