summaryrefslogtreecommitdiff
path: root/src/wx/audio_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/audio_plot.cc
parent5e640ac3e2f6d5fb079ff65659a1483ddac8672e (diff)
Cleanup: use simpler ownership for FilmViewer.
Diffstat (limited to 'src/wx/audio_plot.cc')
-rw-r--r--src/wx/audio_plot.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc
index fbcd9047f..59df0425b 100644
--- a/src/wx/audio_plot.cc
+++ b/src/wx/audio_plot.cc
@@ -54,7 +54,7 @@ int const AudioPlot::_cursor_size = 8;
int const AudioPlot::max_smoothing = 128;
-AudioPlot::AudioPlot (wxWindow* parent, weak_ptr<FilmViewer> viewer)
+AudioPlot::AudioPlot(wxWindow* parent, FilmViewer& viewer)
: wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE)
, _viewer (viewer)
, _smoothing (max_smoothing / 2)
@@ -445,9 +445,7 @@ void
AudioPlot::left_down ()
{
if (_cursor) {
- if (auto fv = _viewer.lock()) {
- fv->seek (_cursor->time, true);
- }
+ _viewer.seek(_cursor->time, true);
}
}