diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-04-20 00:03:19 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-04-20 21:18:19 +0200 |
| commit | 51c4540fdb30d719ebc3998fb9b86c16e5bf0a66 (patch) | |
| tree | 15c706252ce458f48e252db3bfe02d736807a345 /src | |
| parent | d921f2dae281aa6a787e693aea9d6446b6122295 (diff) | |
Tweak handling of wxEVT_PAINT.465-vumeters
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/gl_video_view.cc | 1 | ||||
| -rw-r--r-- | src/wx/gl_view.cc | 1 | ||||
| -rw-r--r-- | src/wx/gl_view.h | 6 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc index c24736570..e53b63c51 100644 --- a/src/wx/gl_video_view.cc +++ b/src/wx/gl_video_view.cc @@ -81,7 +81,6 @@ GLVideoView::GLVideoView(FilmViewer* viewer, wxWindow *parent) , GLView(parent) , _rec2020(false) { - _canvas->Bind(wxEVT_PAINT, boost::bind(&GLVideoView::update, this)); _canvas->Bind(wxEVT_TIMER, boost::bind(&GLVideoView::check_for_butler_errors, this)); _timer.reset(new wxTimer(_canvas)); _timer->Start(2000); diff --git a/src/wx/gl_view.cc b/src/wx/gl_view.cc index 2c7424a29..ddae483f5 100644 --- a/src/wx/gl_view.cc +++ b/src/wx/gl_view.cc @@ -50,6 +50,7 @@ GLView::GLView(wxWindow* parent) parent, attributes, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); _canvas->Bind(wxEVT_SIZE, boost::bind(&GLView::size_changed, this, _1)); + _canvas->Bind(wxEVT_PAINT, boost::bind(&GLView::update, this)); } diff --git a/src/wx/gl_view.h b/src/wx/gl_view.h index f20d5962a..2065f5ede 100644 --- a/src/wx/gl_view.h +++ b/src/wx/gl_view.h @@ -45,8 +45,6 @@ public: GLView(wxWindow* parent); virtual ~GLView(); - virtual void update(); - wxWindow* canvas() const { return _canvas; } @@ -56,12 +54,14 @@ public: } protected: - virtual void size_changed(wxSizeEvent const& ev); virtual void thread_setup() = 0; virtual void draw() = 0; virtual void thread_playing() = 0; virtual boost::optional<int> time_until_next_frame() const = 0; + virtual void size_changed(wxSizeEvent const& ev); + virtual void update(); + void start_thread_if_required(); void start(); void stop(); |
