summaryrefslogtreecommitdiff
path: root/src/wx/video_waveform_plot.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-12 01:03:28 +0200
committerCarl Hetherington <cth@carlh.net>2022-10-14 11:41:18 +0200
commit449f383f13e5755c523db11f9adef53b58391025 (patch)
tree7751c6ede10455de02aa85dcd00d17109c9d57a6 /src/wx/video_waveform_plot.cc
parent5e640ac3e2f6d5fb079ff65659a1483ddac8672e (diff)
Cleanup: use simpler ownership for FilmViewer.
Diffstat (limited to 'src/wx/video_waveform_plot.cc')
-rw-r--r--src/wx/video_waveform_plot.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/wx/video_waveform_plot.cc b/src/wx/video_waveform_plot.cc
index 8e3284682..826e17359 100644
--- a/src/wx/video_waveform_plot.cc
+++ b/src/wx/video_waveform_plot.cc
@@ -53,7 +53,7 @@ int const VideoWaveformPlot::_pixel_values = 4096;
int const VideoWaveformPlot::_x_axis_width = 52;
-VideoWaveformPlot::VideoWaveformPlot (wxWindow* parent, weak_ptr<const Film> film, weak_ptr<FilmViewer> viewer)
+VideoWaveformPlot::VideoWaveformPlot(wxWindow* parent, weak_ptr<const Film> film, FilmViewer& viewer)
: wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE)
, _film (film)
{
@@ -61,10 +61,7 @@ VideoWaveformPlot::VideoWaveformPlot (wxWindow* parent, weak_ptr<const Film> fil
SetDoubleBuffered (true);
#endif
- auto fv = viewer.lock ();
- DCPOMATIC_ASSERT (fv);
-
- _viewer_connection = fv->ImageChanged.connect (boost::bind(&VideoWaveformPlot::set_image, this, _1));
+ _viewer_connection = viewer.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));