X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fvideo_waveform_dialog.cc;h=6b0ed44104b655366ecc260f3395c5423f2583c1;hb=541e55115e8dfb09bb584f8176698d1db6ff826a;hp=1fd96ea0b2800e012478e478f3f0618c29d76d92;hpb=c3433d59c0d320f0451df18c9cb06bfd5fff40b0;p=dcpomatic.git diff --git a/src/wx/video_waveform_dialog.cc b/src/wx/video_waveform_dialog.cc index 1fd96ea0b..6b0ed4410 100644 --- a/src/wx/video_waveform_dialog.cc +++ b/src/wx/video_waveform_dialog.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Carl Hetherington + Copyright (C) 2015-2018 Carl Hetherington This file is part of DCP-o-matic. @@ -28,8 +28,9 @@ using std::cout; using boost::bind; using boost::weak_ptr; +using boost::shared_ptr; -VideoWaveformDialog::VideoWaveformDialog (wxWindow* parent, weak_ptr film, FilmViewer* viewer) +VideoWaveformDialog::VideoWaveformDialog (wxWindow* parent, weak_ptr film, weak_ptr viewer) : wxDialog ( parent, wxID_ANY, @@ -90,7 +91,7 @@ VideoWaveformDialog::VideoWaveformDialog (wxWindow* parent, weak_ptr overall_sizer->SetSizeHints (this); Bind (wxEVT_SHOW, bind (&VideoWaveformDialog::shown, this, _1)); - _component->Bind (wxEVT_COMMAND_CHOICE_SELECTED, bind (&VideoWaveformDialog::component_changed, this)); + _component->Bind (wxEVT_CHOICE, bind (&VideoWaveformDialog::component_changed, this)); _contrast->Bind (wxEVT_SCROLL_THUMBTRACK, bind (&VideoWaveformDialog::contrast_changed, this)); _plot->MouseMoved.connect (bind (&VideoWaveformDialog::mouse_moved, this, _1, _2, _3, _4)); @@ -106,7 +107,9 @@ VideoWaveformDialog::shown (wxShowEvent& ev) { _plot->set_enabled (ev.IsShown ()); if (ev.IsShown ()) { - _viewer->refresh (); + shared_ptr fv = _viewer.lock (); + DCPOMATIC_ASSERT (fv); + fv->slow_refresh (); } }