summaryrefslogtreecommitdiff
path: root/src/wx/content_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-09-11 01:25:16 +0100
committerCarl Hetherington <cth@carlh.net>2018-09-11 11:58:15 +0100
commitc370a1f38215f6461cf4366e6885757e7aa2b96a (patch)
tree6d660895988652297260c2434115b903032bc60d /src/wx/content_panel.cc
parent23b60bec13fa8f0b88c34922a169aa0084d99476 (diff)
Separate out management of controls.
Diffstat (limited to 'src/wx/content_panel.cc')
-rw-r--r--src/wx/content_panel.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index e5990a564..04e35c758 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -26,7 +26,7 @@
#include "timing_panel.h"
#include "timeline_dialog.h"
#include "image_sequence_dialog.h"
-#include "control_film_viewer.h"
+#include "film_viewer.h"
#include "lib/audio_content.h"
#include "lib/text_content.h"
#include "lib/video_content.h"
@@ -61,7 +61,7 @@ using boost::optional;
#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL);
-ContentPanel::ContentPanel (wxNotebook* n, boost::shared_ptr<Film> film, ControlFilmViewer* viewer)
+ContentPanel::ContentPanel (wxNotebook* n, shared_ptr<Film> film, weak_ptr<FilmViewer> viewer)
: _video_panel (0)
, _audio_panel (0)
, _timeline_dialog (0)
@@ -302,7 +302,9 @@ ContentPanel::check_selection ()
}
if (go_to && Config::instance()->jump_to_selected() && signal_manager) {
- signal_manager->when_idle(boost::bind(&ControlFilmViewer::set_position, _film_viewer, go_to.get().ceil(_film->video_frame_rate())));
+ shared_ptr<FilmViewer> fv = _film_viewer.lock ();
+ DCPOMATIC_ASSERT (fv);
+ signal_manager->when_idle(boost::bind(&FilmViewer::set_position, fv.get(), go_to.get().ceil(_film->video_frame_rate())));
}
if (_timeline_dialog) {