git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0670389
)
JAL-3083 another try: restore original GraphLines with original values
bug/JAL-3083cancelAnnotationColour
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Mon, 4 Mar 2019 15:17:17 +0000
(15:17 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Mon, 4 Mar 2019 15:17:17 +0000
(15:17 +0000)
src/jalview/gui/AnnotationColourChooser.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/AnnotationColourChooser.java
b/src/jalview/gui/AnnotationColourChooser.java
index
b29a1dd
..
2b7d678
100644
(file)
--- a/
src/jalview/gui/AnnotationColourChooser.java
+++ b/
src/jalview/gui/AnnotationColourChooser.java
@@
-63,7
+63,9
@@
public class AnnotationColourChooser extends AnnotationRowFilter
private Map<SequenceGroup, ColourSchemeI> oldgroupColours;
private Map<SequenceGroup, ColourSchemeI> oldgroupColours;
- private Map<AlignmentAnnotation, GraphLine> oldThresholds;
+ private Map<AlignmentAnnotation, GraphLine> oldGraphLines;
+
+ private Map<GraphLine, Float> oldThresholds;
private JCheckBox useOriginalColours = new JCheckBox();
private JCheckBox useOriginalColours = new JCheckBox();
@@
-183,6
+185,7
@@
public class AnnotationColourChooser extends AnnotationRowFilter
* save any existing annotation threshold settings; note we make a copy
* of each in case the current threshold value gets amended
*/
* save any existing annotation threshold settings; note we make a copy
* of each in case the current threshold value gets amended
*/
+ oldGraphLines = new HashMap<>();
oldThresholds = new HashMap<>();
AlignmentAnnotation[] anns = av.getAlignment().getAlignmentAnnotation();
if (anns != null)
oldThresholds = new HashMap<>();
AlignmentAnnotation[] anns = av.getAlignment().getAlignmentAnnotation();
if (anns != null)
@@
-190,8
+193,11
@@
public class AnnotationColourChooser extends AnnotationRowFilter
for (AlignmentAnnotation ann : anns)
{
GraphLine thresh = ann.getThreshold();
for (AlignmentAnnotation ann : anns)
{
GraphLine thresh = ann.getThreshold();
- oldThresholds.put(ann,
- thresh == null ? null : new GraphLine(thresh));
+ oldGraphLines.put(ann, thresh);
+ if (thresh != null)
+ {
+ oldThresholds.put(thresh, thresh.value);
+ }
}
}
}
}
}
}
@@
-364,10
+370,15
@@
public class AnnotationColourChooser extends AnnotationRowFilter
sg.setColourScheme(oldgroupColours.get(sg));
}
}
sg.setColourScheme(oldgroupColours.get(sg));
}
}
- for (Entry<AlignmentAnnotation, GraphLine> entry : oldThresholds
+ for (Entry<AlignmentAnnotation, GraphLine> entry : oldGraphLines
.entrySet())
{
.entrySet())
{
- entry.getKey().setThreshold(entry.getValue());
+ GraphLine graphLine = entry.getValue();
+ entry.getKey().setThreshold(graphLine);
+ if (graphLine != null)
+ {
+ graphLine.value = oldThresholds.get(graphLine).floatValue();
+ }
}
}
}
}