JAL-3473 Checked value of def and min. Set def to min if lower than min. bug/JAL-3473_SpinnerNumberModel_causing_IllegalArgumentException
authorBen Soares <bsoares@dundee.ac.uk>
Thu, 31 Oct 2019 14:18:48 +0000 (14:18 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Thu, 31 Oct 2019 14:18:48 +0000 (14:18 +0000)
src/jalview/jbgui/GPreferences.java

index 6e4b400..6de3888 100755 (executable)
@@ -2562,6 +2562,10 @@ public class GPreferences extends JPanel
     {
       max = def;
     }
+    if (def < min)
+    {
+      def = min;
+    }
     SpinnerModel sModel = new SpinnerNumberModel(def, min, max, 1);
     s.setModel(sModel);