X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fcaption_content.cc;h=4d0795190dc9f61261ffb3c282070bf8cff955a8;hp=4fa8b678f3337b61452666185780e5b432df15fc;hb=6f146336b73fe720c83cb75ebdf15e9cb9c02973;hpb=9cbe57dda759fccfa9dec8a0820114d7d8583a36 diff --git a/src/lib/caption_content.cc b/src/lib/caption_content.cc index 4fa8b678f..4d0795190 100644 --- a/src/lib/caption_content.cc +++ b/src/lib/caption_content.cc @@ -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) @@ -67,8 +67,8 @@ CaptionContent::CaptionContent (Content* parent) , _y_scale (1) , _line_spacing (1) , _outline_width (2) - , _type (CAPTION_OPEN) - , _original_type (CAPTION_OPEN) + , _type (original_type) + , _original_type (original_type) { } @@ -121,6 +121,7 @@ CaptionContent::CaptionContent (Content* parent, cxml::ConstNodePtr node, int ve , _line_spacing (node->optional_number_child("LineSpacing").get_value_or (1)) , _outline_width (node->optional_number_child("OutlineWidth").get_value_or (2)) , _type (CAPTION_OPEN) + , _original_type (CAPTION_OPEN) { if (version >= 37) { _use = node->bool_child ("Use"); @@ -225,7 +226,7 @@ CaptionContent::CaptionContent (Content* parent, cxml::ConstNodePtr node, int ve connect_to_fonts (); _type = string_to_caption_type (node->optional_string_child("Type").get_value_or("open")); - _original_type = string_to_caption_type (node->optional_string_child("Type").get_value_or("open")); + _original_type = string_to_caption_type (node->optional_string_child("OriginalType").get_value_or("open")); } CaptionContent::CaptionContent (Content* parent, vector > c) @@ -305,6 +306,8 @@ CaptionContent::CaptionContent (Content* parent, vector > c) _fade_in = ref->fade_in (); _fade_out = ref->fade_out (); _outline_width = ref->outline_width (); + _type = ref->type (); + _original_type = ref->original_type (); connect_to_fonts (); }