Display only required tabs, including subs / ccap.
[dcpomatic.git] / src / lib / caption_content.cc
index 368d276d93abfbc893829206a82cba4d5cf46366..37a3e7c70f7b8b22058e896d70d08a39e7349779 100644 (file)
@@ -57,7 +57,7 @@ int const CaptionContentProperty::FADE_OUT = 513;
 int const CaptionContentProperty::OUTLINE_WIDTH = 514;
 int const CaptionContentProperty::TYPE = 515;
 
-CaptionContent::CaptionContent (Content* parent)
+CaptionContent::CaptionContent (Content* parent, CaptionType original_type)
        : ContentPart (parent)
        , _use (false)
        , _burn (false)
@@ -68,7 +68,7 @@ CaptionContent::CaptionContent (Content* parent)
        , _line_spacing (1)
        , _outline_width (2)
        , _type (CAPTION_OPEN)
-       , _original_type (CAPTION_OPEN)
+       , _original_type (original_type)
 {
 
 }
@@ -99,7 +99,7 @@ CaptionContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version)
                return c;
        }
 
-       if (!node->node_child("Caption")) {
+       if (!node->optional_node_child("Caption")) {
                return list<shared_ptr<CaptionContent> >();
        }