Add FilmViewer::time_until_next_frame.
[dcpomatic.git] / src / wx / timeline_text_content_view.cc
index b4820bfea8471d4598fe38c60d13663a7c97a325..1345ea5e49457950f4abea14fc9ef571285dfa7d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -24,8 +24,9 @@
 
 using boost::shared_ptr;
 
-TimelineTextContentView::TimelineTextContentView (Timeline& tl, shared_ptr<Content> c)
+TimelineTextContentView::TimelineTextContentView (Timeline& tl, shared_ptr<Content> c, shared_ptr<TextContent> caption)
        : TimelineContentView (tl, c)
+       , _caption (caption)
 {
 
 }
@@ -53,7 +54,5 @@ TimelineTextContentView::foreground_colour () const
 bool
 TimelineTextContentView::active () const
 {
-       shared_ptr<Content> c = _content.lock ();
-       DCPOMATIC_ASSERT (c);
-       return c->subtitle && c->subtitle->use();
+       return _caption->use();
 }