Merge branch 'JAL-1322' into Release_2_8_1_Branch
authorJim Procter <jprocter@dundee.ac.uk>
Sun, 27 Apr 2014 22:15:11 +0000 (23:15 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Sun, 27 Apr 2014 22:15:11 +0000 (23:15 +0100)
src/jalview/gui/OptsAndParamsPage.java

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