From: Carl Hetherington Date: Fri, 24 Apr 2020 15:46:01 +0000 (+0200) Subject: Fix typo and missing serialisation of offsets at time of analysis. X-Git-Tag: v2.15.58~6 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=3dc465914c2853923535ab630457874c11b1db3e;p=dcpomatic.git Fix typo and missing serialisation of offsets at time of analysis. --- diff --git a/src/lib/subtitle_analysis.cc b/src/lib/subtitle_analysis.cc index 91fec90b0..f8254f00d 100644 --- a/src/lib/subtitle_analysis.cc +++ b/src/lib/subtitle_analysis.cc @@ -50,6 +50,9 @@ SubtitleAnalysis::SubtitleAnalysis (boost::filesystem::path path) _bounding_box->width = bounding_box->number_child("Width"); _bounding_box->height = bounding_box->number_child("Height"); } + + _analysis_x_offset = f.number_child("AnalysisXOffset"); + _analysis_y_offset = f.number_child("AnalysisYOffset"); } @@ -69,6 +72,9 @@ SubtitleAnalysis::write (boost::filesystem::path path) const bounding_box->add_child("Height")->add_child_text(raw_convert(_bounding_box->height)); } + root->add_child("AnalysisXOffset")->add_child_text(raw_convert(_analysis_x_offset)); + root->add_child("AnalysisYOffset")->add_child_text(raw_convert(_analysis_y_offset)); + doc->write_to_file_formatted (path.string()); } diff --git a/src/lib/subtitle_analysis.h b/src/lib/subtitle_analysis.h index 47eb52411..6a7049a29 100644 --- a/src/lib/subtitle_analysis.h +++ b/src/lib/subtitle_analysis.h @@ -53,7 +53,7 @@ public: } double analysis_y_offset () const { - return _analysis_x_offset; + return _analysis_y_offset; } private: