summaryrefslogtreecommitdiff
path: root/src/lib/text_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-25 14:00:19 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-25 14:00:19 +0100
commitf80740363455d4c78f4132f9e58006a84034b9d0 (patch)
tree03f5db194ca449c61d6d529e3b08b559e2b845e2 /src/lib/text_content.cc
parentd71cf1ae31c7d488c95cd63278b200035e4d6a63 (diff)
Fix loading of old projects.v2.13.39
Diffstat (limited to 'src/lib/text_content.cc')
-rw-r--r--src/lib/text_content.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/text_content.cc b/src/lib/text_content.cc
index 7c3c27d45..ee29ae8c4 100644
--- a/src/lib/text_content.cc
+++ b/src/lib/text_content.cc
@@ -121,6 +121,7 @@ TextContent::TextContent (Content* parent, cxml::ConstNodePtr node, int version)
, _line_spacing (node->optional_number_child<double>("LineSpacing").get_value_or (1))
, _outline_width (node->optional_number_child<int>("OutlineWidth").get_value_or (2))
, _type (TEXT_OPEN_SUBTITLE)
+ , _original_type (TEXT_OPEN_SUBTITLE)
{
if (version >= 37) {
_use = node->bool_child ("Use");
@@ -224,9 +225,11 @@ TextContent::TextContent (Content* parent, cxml::ConstNodePtr node, int version)
connect_to_fonts ();
- _type = string_to_text_type (node->optional_string_child("Type").get_value_or("open"));
- if (node->optional_string_child("OriginalType")) {
- _original_type = string_to_text_type (node->optional_string_child("OriginalType").get());
+ if (version >= 37) {
+ _type = string_to_text_type (node->optional_string_child("Type").get_value_or("open"));
+ if (node->optional_string_child("OriginalType")) {
+ _original_type = string_to_text_type (node->optional_string_child("OriginalType").get());
+ }
}
}