summaryrefslogtreecommitdiff
path: root/src/lib/film.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/film.cc')
-rw-r--r--src/lib/film.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index fb5014b3a..1d07ec77f 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -86,7 +86,7 @@ using libdcp::Signer;
* 6 -> 7
* Subtitle offset changed to subtitle y offset, and subtitle x offset added.
*/
-int const Film::state_version = 7;
+int const Film::current_state_version = 7;
/** Construct a Film object in a given directory.
*
@@ -110,6 +110,7 @@ Film::Film (boost::filesystem::path dir, bool log)
, _three_d (false)
, _sequence_video (true)
, _interop (false)
+ , _state_version (current_state_version)
, _dirty (false)
{
set_dci_date_today ();
@@ -339,7 +340,7 @@ Film::metadata () const
shared_ptr<xmlpp::Document> doc (new xmlpp::Document);
xmlpp::Element* root = doc->create_root_node ("Metadata");
- root->add_child("Version")->add_child_text (lexical_cast<string> (state_version));
+ root->add_child("Version")->add_child_text (lexical_cast<string> (current_state_version));
root->add_child("Name")->add_child_text (_name);
root->add_child("UseDCIName")->add_child_text (_use_dci_name ? "1" : "0");
@@ -393,7 +394,7 @@ Film::read_metadata ()
cxml::Document f ("Metadata");
f.read_file (file ("metadata.xml"));
- int const version = f.number_child<int> ("Version");
+ _state_version = f.number_child<int> ("Version");
_name = f.string_child ("Name");
_use_dci_name = f.bool_child ("UseDCIName");
@@ -426,7 +427,7 @@ Film::read_metadata ()
_three_d = f.bool_child ("ThreeD");
_interop = f.bool_child ("Interop");
_key = libdcp::Key (f.string_child ("Key"));
- _playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"), version);
+ _playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"), _state_version);
_dirty = false;
}