JAL-1322 avoid rounding error causing non functional slider and allow slider to reach...
authorJim Procter <jprocter@dundee.ac.uk>
Sun, 27 Apr 2014 22:14:24 +0000 (23:14 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Sun, 27 Apr 2014 22:14:24 +0000 (23:14 +0100)
src/jalview/gui/OptsAndParamsPage.java

index c2f3dbc..1dd848b 100644 (file)
@@ -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
           {