JAL-1503 update version in GPL header
[jalview.git] / src / jalview / gui / OptsAndParamsPage.java
index 3bc99dd..5df0174 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * This file is part of Jalview.
@@ -594,9 +594,12 @@ public class OptsAndParamsPage
             @Override
             public void keyReleased(KeyEvent e)
             {
-              if (valueField.getText().trim().length() > 0)
+              if (e.isActionKey())
               {
-                actionPerformed(null);
+                if (valueField.getText().trim().length() > 0)
+                {
+                  actionPerformed(null);
+                }
               }
             }
 
@@ -676,7 +679,7 @@ public class OptsAndParamsPage
           {
             slider.getModel().setRangeProperties(iVal, 1,
                     validator.getMin().intValue(),
-                    validator.getMax().intValue(), true);
+                    validator.getMax().intValue()+1, true);
           }
           else
           {
@@ -716,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
           {