git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of https://source.jalview.org/git/jalview into features/JAL...
[jalview.git]
/
src
/
jalview
/
gui
/
AnnotationRowFilter.java
diff --git
a/src/jalview/gui/AnnotationRowFilter.java
b/src/jalview/gui/AnnotationRowFilter.java
index
1035a6c
..
a3ce528
100644
(file)
--- a/
src/jalview/gui/AnnotationRowFilter.java
+++ b/
src/jalview/gui/AnnotationRowFilter.java
@@
-129,8
+129,13
@@
public abstract class AnnotationRowFilter extends JPanel
});
}
});
}
+ /**
+ * update the text field from the threshold slider. preserves state of
+ * 'adjusting' so safe to call in init.
+ */
protected void setThresholdValueText()
{
protected void setThresholdValueText()
{
+ boolean oldadj = adjusting;
adjusting = true;
if (percentThreshold.isSelected())
{
adjusting = true;
if (percentThreshold.isSelected())
{
@@
-141,7
+146,7
@@
public abstract class AnnotationRowFilter extends JPanel
{
thresholdValue.setText((slider.getValue() / 1000f) + "");
}
{
thresholdValue.setText((slider.getValue() / 1000f) + "");
}
- adjusting = false;
+ adjusting = oldadj;
}
protected void addSliderMouseListeners()
{
}
protected void addSliderMouseListeners()
{
@@
-291,7
+296,7
@@
public abstract class AnnotationRowFilter extends JPanel
try
{
float f = Float.parseFloat(thresholdValue.getText());
try
{
float f = Float.parseFloat(thresholdValue.getText());
- if (percentThreshold.isEnabled())
+ if (percentThreshold.isSelected())
{
slider.setValue(slider.getMinimum()
+ ((int) ((f / 100f) * (slider.getMaximum() - slider
{
slider.setValue(slider.getMinimum()
+ ((int) ((f / 100f) * (slider.getMaximum() - slider