X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fvideo_waveform_dialog.cc;h=f3d4a7aa527330d9d09718cfc6e8200295c0a5e8;hb=f10e025eba54b0ab4dbe1b3611071b160ca89208;hp=c38dbf65d98a0d9b52ba44a64640a4a6b505aca1;hpb=14cccb179fff7bbbf422e13f9d2e3264239c93c7;p=dcpomatic.git diff --git a/src/wx/video_waveform_dialog.cc b/src/wx/video_waveform_dialog.cc index c38dbf65d..f3d4a7aa5 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. @@ -22,14 +22,16 @@ #include "video_waveform_plot.h" #include "film_viewer.h" #include "wx_util.h" +#include "static_text.h" #include #include 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, @@ -66,11 +68,11 @@ VideoWaveformDialog::VideoWaveformDialog (wxWindow* parent, weak_ptr wxBoxSizer* position = new wxBoxSizer (wxHORIZONTAL); add_label_to_sizer (position, this, _("Image X position"), true); - _x_position = new wxStaticText (this, wxID_ANY, ""); + _x_position = new StaticText (this, ""); _x_position->SetMinSize (wxSize (64, -1)); position->Add (_x_position, 0, wxALL, DCPOMATIC_SIZER_X_GAP); add_label_to_sizer (position, this, _("component value"), true); - _value = new wxStaticText (this, wxID_ANY, ""); + _value = new StaticText (this, ""); _value->SetMinSize (wxSize (64, -1)); position->Add (_value, 0, wxALL, DCPOMATIC_SIZER_X_GAP); overall_sizer->Add (position, 0, wxEXPAND | wxALL, DCPOMATIC_SIZER_Y_GAP); @@ -106,7 +108,9 @@ VideoWaveformDialog::shown (wxShowEvent& ev) { _plot->set_enabled (ev.IsShown ()); if (ev.IsShown ()) { - _viewer->slow_refresh (); + shared_ptr fv = _viewer.lock (); + DCPOMATIC_ASSERT (fv); + fv->slow_refresh (); } }