diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-07-26 17:07:36 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-07-26 17:07:36 +0100 |
| commit | e1093a718c15e1c9ca98abbf514ec54293f0723a (patch) | |
| tree | 163dbf9cd224e0403a12c7c5c7c99037ce889c38 /src | |
| parent | 4202d4f2f41c9de370681b8c44ebb926d8c12f8d (diff) | |
Fix seek during slider drag.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/film_viewer.cc | 11 | ||||
| -rw-r--r-- | src/wx/film_viewer.h | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index a326cfa0b..4c3cc386c 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -135,7 +135,10 @@ FilmViewer::FilmViewer (wxWindow* p) _outline_content->Bind (wxEVT_CHECKBOX, boost::bind (&FilmViewer::refresh_panel, this)); _left_eye->Bind (wxEVT_RADIOBUTTON, boost::bind (&FilmViewer::refresh, this)); _right_eye->Bind (wxEVT_RADIOBUTTON, boost::bind (&FilmViewer::refresh, this)); - _slider->Bind (wxEVT_SCROLL_CHANGED, boost::bind (&FilmViewer::slider_moved, this)); + _slider->Bind (wxEVT_SCROLL_THUMBTRACK, boost::bind (&FilmViewer::slider_moved, this, false)); + _slider->Bind (wxEVT_SCROLL_PAGEUP, boost::bind (&FilmViewer::slider_moved, this, false)); + _slider->Bind (wxEVT_SCROLL_PAGEDOWN, boost::bind (&FilmViewer::slider_moved, this, false)); + _slider->Bind (wxEVT_SCROLL_CHANGED, boost::bind (&FilmViewer::slider_moved, this, true)); _play_button->Bind (wxEVT_TOGGLEBUTTON, boost::bind (&FilmViewer::play_clicked, this)); _timer.Bind (wxEVT_TIMER, boost::bind (&FilmViewer::timer, this)); _back_button->Bind (wxEVT_LEFT_DOWN, boost::bind (&FilmViewer::back_clicked, this, _1)); @@ -369,7 +372,7 @@ FilmViewer::paint_panel () } void -FilmViewer::slider_moved () +FilmViewer::slider_moved (bool update_slider) { if (!_film) { return; @@ -382,7 +385,9 @@ FilmViewer::slider_moved () } seek (t, false); update_position_label (); - update_position_slider (); + if (update_slider) { + update_position_slider (); + } } void diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h index aacede06e..4a704ae6c 100644 --- a/src/wx/film_viewer.h +++ b/src/wx/film_viewer.h @@ -63,7 +63,7 @@ public: private: void paint_panel (); void panel_sized (wxSizeEvent &); - void slider_moved (); + void slider_moved (bool update_slider); void play_clicked (); void timer (); void calculate_sizes (); |
