JAL-2385 update slider settings when switching slider panel focus
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 20 Jan 2017 14:20:48 +0000 (14:20 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 20 Jan 2017 14:20:48 +0000 (14:20 +0000)
src/jalview/appletgui/SliderPanel.java
src/jalview/gui/SeqPanel.java
src/jalview/gui/SliderPanel.java

index ec64b3b..3e6dbe6 100644 (file)
@@ -73,6 +73,7 @@ public class SliderPanel extends Panel implements ActionListener,
     else
     {
       sp = (SliderPanel) conservationSlider.getComponent(0);
+      sp.valueField.setText(String.valueOf(cs.getConservationInc()));
       sp.cs = cs;
     }
 
@@ -132,6 +133,7 @@ public class SliderPanel extends Panel implements ActionListener,
     else
     {
       pid = (SliderPanel) PIDSlider.getComponent(0);
+      pid.valueField.setText(String.valueOf(cs.getThreshold()));
       pid.cs = cs;
     }
     PIDSlider
index 5b87445..4fdb25a 100644 (file)
@@ -1737,7 +1737,7 @@ public class SeqPanel extends JPanel implements MouseListener,
         SliderPanel.setConservationSlider(ap, stretchGroup.cs,
                 stretchGroup.getName());
       }
-      else
+      if (stretchGroup.cs.getThreshold() > 0)
       {
         SliderPanel.setPIDSliderSource(ap, stretchGroup.cs,
                 stretchGroup.getName());
index 7d733c9..62ee954 100755 (executable)
@@ -141,7 +141,7 @@ public class SliderPanel extends GSliderPanel
     else
     {
       sp = (SliderPanel) conservationSlider.getContentPane();
-      sp.slider.setValue(cs.getConservationInc());
+      sp.valueField.setText(String.valueOf(cs.getConservationInc()));
       sp.cs = cs;
     }
 
@@ -249,7 +249,7 @@ public class SliderPanel extends GSliderPanel
     else
     {
       pid = (SliderPanel) PIDSlider.getContentPane();
-      pid.slider.setValue(cs.getThreshold());
+      pid.valueField.setText(String.valueOf(cs.getThreshold()));
       pid.cs = cs;
     }