From: Jim Procter Date: Sun, 27 Apr 2014 22:14:24 +0000 (+0100) Subject: JAL-1322 avoid rounding error causing non functional slider and allow slider to reach... X-Git-Tag: Jalview_2_9~192^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=be82f3ed45d1f5300232ce18ea3747bd09727211;p=jalview.git JAL-1322 avoid rounding error causing non functional slider and allow slider to reach maximum value for parameter --- diff --git a/src/jalview/gui/OptsAndParamsPage.java b/src/jalview/gui/OptsAndParamsPage.java index c2f3dbc..1dd848b 100644 --- a/src/jalview/gui/OptsAndParamsPage.java +++ b/src/jalview/gui/OptsAndParamsPage.java @@ -719,9 +719,9 @@ public class OptsAndParamsPage ; if (validator.getMin() != null && validator.getMax() != null) { - slider.getModel().setRangeProperties((int) fVal * 1000, 1, - (int) validator.getMin().floatValue() * 1000, - (int) validator.getMax().floatValue() * 1000, true); + slider.getModel().setRangeProperties((int) (fVal * 1000f), 1, + (int) (validator.getMin().floatValue() * 1000f), + 1+(int) (validator.getMax().floatValue() * 1000f), true); } else {