summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-11 13:54:14 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-11 13:54:14 +0100
commita8b56b931203f984ae7e3f66bc5b9e66d0942199 (patch)
tree19391c97048be3c825178f287f5cb1bc751fbb1e /src
parent8e8eb8a229a0ed385a53531fb1ad63aff1b0ee97 (diff)
Stop subtitles wandering about when re-setup.
Diffstat (limited to 'src')
-rw-r--r--src/wx/film_viewer.cc5
1 files 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<SubtitleView>::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<wxBitmap> bitmap;
};