X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fvideo_waveform_plot.cc;h=9f71140f308345526e5964f9fb96657de120d7fb;hb=f37b8122a04c6a7f8a86c77de44ac995b9555d1a;hp=339689a2ebdbdaeea28ef45ab4482ec7520c93b3;hpb=54ef7357a87885ec329a25e758fb6b132816ec67;p=dcpomatic.git 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 film, ControlFilmViewer* viewer) +VideoWaveformPlot::VideoWaveformPlot (wxWindow* parent, weak_ptr film, weak_ptr 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 fil SetDoubleBuffered (true); #endif - _viewer_connection = viewer->ImageChanged.connect (boost::bind (&VideoWaveformPlot::set_image, this, _1)); + shared_ptr 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));