From be82f3ed45d1f5300232ce18ea3747bd09727211 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sun, 27 Apr 2014 23:14:24 +0100 Subject: [PATCH] JAL-1322 avoid rounding error causing non functional slider and allow slider to reach maximum value for parameter --- src/jalview/gui/OptsAndParamsPage.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 { -- 1.7.10.2