diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-04-24 17:46:01 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-04-24 17:46:01 +0200 |
| commit | 3dc465914c2853923535ab630457874c11b1db3e (patch) | |
| tree | eae4541981e6b36171c215b2f97a0391d710fb1d | |
| parent | 61d004c90682fea31096a3645af56ae5080f13c3 (diff) | |
Fix typo and missing serialisation of offsets at time of analysis.
| -rw-r--r-- | src/lib/subtitle_analysis.cc | 6 | ||||
| -rw-r--r-- | src/lib/subtitle_analysis.h | 2 |
2 files changed, 7 insertions, 1 deletions
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<double>("Width"); _bounding_box->height = bounding_box->number_child<double>("Height"); } + + _analysis_x_offset = f.number_child<double>("AnalysisXOffset"); + _analysis_y_offset = f.number_child<double>("AnalysisYOffset"); } @@ -69,6 +72,9 @@ SubtitleAnalysis::write (boost::filesystem::path path) const bounding_box->add_child("Height")->add_child_text(raw_convert<string>(_bounding_box->height)); } + root->add_child("AnalysisXOffset")->add_child_text(raw_convert<string>(_analysis_x_offset)); + root->add_child("AnalysisYOffset")->add_child_text(raw_convert<string>(_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: |
