From 49665d43dbcc49a55d7d44fbf58a7c27ab0ae860 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 20 Jan 2017 14:20:48 +0000 Subject: [PATCH] JAL-2385 update slider settings when switching slider panel focus --- src/jalview/appletgui/SliderPanel.java | 2 ++ src/jalview/gui/SeqPanel.java | 2 +- src/jalview/gui/SliderPanel.java | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/jalview/appletgui/SliderPanel.java b/src/jalview/appletgui/SliderPanel.java index ec64b3b..3e6dbe6 100644 --- a/src/jalview/appletgui/SliderPanel.java +++ b/src/jalview/appletgui/SliderPanel.java @@ -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 diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 5b87445..4fdb25a 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -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()); diff --git a/src/jalview/gui/SliderPanel.java b/src/jalview/gui/SliderPanel.java index 7d733c9..62ee954 100755 --- a/src/jalview/gui/SliderPanel.java +++ b/src/jalview/gui/SliderPanel.java @@ -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; } -- 1.7.10.2