summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-04-11 23:05:22 +0100
committerCarl Hetherington <cth@carlh.net>2016-04-11 23:05:22 +0100
commit5e1c6b68d2577498b47489f3e08331722fc50de5 (patch)
tree66d975d2f00b4c30b56b477d71d3f936124e281a
parent3d2fdefdb1bcf0a2baf2285246ed413654bf1f9d (diff)
Add similar rounding to subtitle offsets as already exist for scale,
to try to fix strange sticking of spin buttons on arbitrary values.
-rw-r--r--ChangeLog2
-rw-r--r--src/wx/subtitle_panel.cc4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a5c68e776..171f9d821 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2016-04-11 Carl Hetherington <cth@carlh.net>
+ * Hopefully fix strange limits on x/y offset of subtitles.
+
* Add UTC-3:30 timezone to Cinema configuration (#831).
* Add option to preview left or right eye (#809).
diff --git a/src/wx/subtitle_panel.cc b/src/wx/subtitle_panel.cc
index ad6a024e6..a53679673 100644
--- a/src/wx/subtitle_panel.cc
+++ b/src/wx/subtitle_panel.cc
@@ -190,9 +190,9 @@ SubtitlePanel::film_content_changed (int property)
} else if (property == SubtitleContentProperty::BURN_SUBTITLES) {
checked_set (_burn, scs ? scs->burn_subtitles() : false);
} else if (property == SubtitleContentProperty::SUBTITLE_X_OFFSET) {
- checked_set (_x_offset, scs ? (scs->subtitle_x_offset() * 100) : 0);
+ checked_set (_x_offset, scs ? lrint (scs->subtitle_x_offset() * 100) : 0);
} else if (property == SubtitleContentProperty::SUBTITLE_Y_OFFSET) {
- checked_set (_y_offset, scs ? (scs->subtitle_y_offset() * 100) : 0);
+ checked_set (_y_offset, scs ? lrint (scs->subtitle_y_offset() * 100) : 0);
} else if (property == SubtitleContentProperty::SUBTITLE_X_SCALE) {
checked_set (_x_scale, scs ? lrint (scs->subtitle_x_scale() * 100) : 100);
} else if (property == SubtitleContentProperty::SUBTITLE_Y_SCALE) {