Include subscribers / supporters in git.
[dcpomatic.git] / src / wx / controls.h
index a2c80b8090bdd9c9d30e700bea47eeef89a4e8aa..377960425ba2807e5982ede7f25ffd4ec8e376a5 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2018-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #ifndef DCPOMATIC_CONTROLS_H
 #define DCPOMATIC_CONTROLS_H
 
+
 #include "lib/dcpomatic_time.h"
 #include "lib/types.h"
 #include "lib/film.h"
@@ -30,6 +32,7 @@ DCPOMATIC_DISABLE_WARNINGS
 DCPOMATIC_ENABLE_WARNINGS
 #include <boost/signals2.hpp>
 
+
 class FilmViewer;
 class Film;
 class ClosedCaptionsDialog;
@@ -39,10 +42,12 @@ class wxToggleButton;
 class wxListCtrl;
 class ContentView;
 
+
 namespace dcp {
        class CPL;
 }
 
+
 class Controls : public wxPanel
 {
 public:
@@ -64,6 +69,7 @@ public:
        void forward_frame ();
 
 protected:
+
        virtual void started ();
        virtual void stopped ();
        virtual void setup_sensitivity ();
@@ -73,7 +79,7 @@ protected:
        wxBoxSizer* _button_sizer;
        std::shared_ptr<Film> _film;
        wxSlider* _slider;
-       std::shared_ptr<FilmViewer> _viewer;
+       std::weak_ptr<FilmViewer> _viewer;
        boost::optional<std::string> _active_job;
 
 private:
@@ -117,4 +123,5 @@ private:
        boost::signals2::scoped_connection _config_changed_connection;
 };
 
+
 #endif