summaryrefslogtreecommitdiff
path: root/src/wx/video_waveform_plot.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-09-11 01:25:16 +0100
committerCarl Hetherington <cth@carlh.net>2018-09-11 11:58:15 +0100
commitc370a1f38215f6461cf4366e6885757e7aa2b96a (patch)
tree6d660895988652297260c2434115b903032bc60d /src/wx/video_waveform_plot.cc
parent23b60bec13fa8f0b88c34922a169aa0084d99476 (diff)
Separate out management of controls.
Diffstat (limited to 'src/wx/video_waveform_plot.cc')
-rw-r--r--src/wx/video_waveform_plot.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wx/video_waveform_plot.cc b/src/wx/video_waveform_plot.cc
index 339689a2e..9f71140f3 100644
--- a/src/wx/video_waveform_plot.cc
+++ b/src/wx/video_waveform_plot.cc
@@ -19,7 +19,7 @@
*/
#include "video_waveform_plot.h"
-#include "control_film_viewer.h"
+#include "film_viewer.h"
#include "wx_util.h"
#include "lib/image.h"
#include "lib/film.h"
@@ -43,7 +43,7 @@ int const VideoWaveformPlot::_vertical_margin = 8;
int const VideoWaveformPlot::_pixel_values = 4096;
int const VideoWaveformPlot::_x_axis_width = 52;
-VideoWaveformPlot::VideoWaveformPlot (wxWindow* parent, weak_ptr<const Film> film, ControlFilmViewer* viewer)
+VideoWaveformPlot::VideoWaveformPlot (wxWindow* parent, weak_ptr<const Film> film, weak_ptr<FilmViewer> viewer)
: wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE)
, _film (film)
, _dirty (true)
@@ -55,7 +55,10 @@ VideoWaveformPlot::VideoWaveformPlot (wxWindow* parent, weak_ptr<const Film> fil
SetDoubleBuffered (true);
#endif
- _viewer_connection = viewer->ImageChanged.connect (boost::bind (&VideoWaveformPlot::set_image, this, _1));
+ shared_ptr<FilmViewer> fv = viewer.lock ();
+ DCPOMATIC_ASSERT (fv);
+
+ _viewer_connection = fv->ImageChanged.connect (boost::bind (&VideoWaveformPlot::set_image, this, _1));
Bind (wxEVT_PAINT, boost::bind (&VideoWaveformPlot::paint, this));
Bind (wxEVT_SIZE, boost::bind (&VideoWaveformPlot::sized, this, _1));