Fix non-movement of position slider and label after dragging
authorCarl Hetherington <cth@carlh.net>
Sun, 3 Mar 2019 23:59:58 +0000 (23:59 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 4 Mar 2019 08:05:05 +0000 (08:05 +0000)
the position slider on OS X (probably #1452).

src/wx/controls.cc

index 5e68baaa005863bca4c04b7cafa4335b38ee37d4..3e06664607d8617a158af7fbe74780b3ebb84774 100644 (file)
@@ -120,6 +120,13 @@ Controls::Controls (wxWindow* parent, shared_ptr<FilmViewer> viewer, bool editor
        _slider->Bind           (wxEVT_SCROLL_PAGEUP,        boost::bind(&Controls::slider_moved,    this, true));
        _slider->Bind           (wxEVT_SCROLL_PAGEDOWN,      boost::bind(&Controls::slider_moved,    this, true));
        _slider->Bind           (wxEVT_SCROLL_CHANGED,       boost::bind(&Controls::slider_released, this));
+#ifdef DCPOMATIC_OSX
+       /* _CHANGED is not received on OS X (at least, not when the
+          slider is dragged), so use this instead.  Perhaps all
+          platforms could just use _THUMBRELEASE.
+       */
+       _slider->Bind           (wxEVT_SCROLL_THUMBRELEASE,  boost::bind(&Controls::slider_released, this));
+#endif
        _rewind_button->Bind    (wxEVT_LEFT_DOWN,            boost::bind(&Controls::rewind_clicked,  this, _1));
        _back_button->Bind      (wxEVT_LEFT_DOWN,            boost::bind(&Controls::back_clicked,    this, _1));
        _forward_button->Bind   (wxEVT_LEFT_DOWN,            boost::bind(&Controls::forward_clicked, this, _1));