From a8b56b931203f984ae7e3f66bc5b9e66d0942199 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 11 Oct 2012 13:54:14 +0100 Subject: [PATCH] Stop subtitles wandering about when re-setup. --- src/wx/film_viewer.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 6a992f0db..cd043b04e 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -74,7 +74,7 @@ public: if (_film->with_subtitles ()) { for (list::iterator i = _subtitles.begin(); i != _subtitles.end(); ++i) { - dc.DrawBitmap (*i->bitmap, i->position.x, i->position.y, true); + dc.DrawBitmap (*i->bitmap, i->cropped_position.x, i->cropped_position.y, true); } } } @@ -188,7 +188,7 @@ private: i->cropped_image.Rescale (cropped_sub_rect.w * x_scale, cropped_sub_rect.h * y_scale, wxIMAGE_QUALITY_HIGH); - i->position = Position ( + i->cropped_position = Position ( cropped_sub_rect.x * x_scale, cropped_sub_rect.y * y_scale ); @@ -216,6 +216,7 @@ private: Position position; wxImage image; + Position cropped_position; wxImage cropped_image; shared_ptr bitmap; }; -- 2.30.2