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 (from parent 1:
aa25fa1
)
patch to fix occasional arrayoutofbounds exception when working with hidden columns...
author
jprocter
<Jim Procter>
Tue, 14 Apr 2009 12:32:14 +0000
(12:32 +0000)
committer
jprocter
<Jim Procter>
Tue, 14 Apr 2009 12:32:14 +0000
(12:32 +0000)
src/jalview/datamodel/ColumnSelection.java
patch
|
blob
|
history
diff --git
a/src/jalview/datamodel/ColumnSelection.java
b/src/jalview/datamodel/ColumnSelection.java
index
ca54570
..
9dbaced
100644
(file)
--- a/
src/jalview/datamodel/ColumnSelection.java
+++ b/
src/jalview/datamodel/ColumnSelection.java
@@
-998,15
+998,17
@@
public class ColumnSelection
if (end > blockStart)
\r
{
\r
annels.addElement(els = new Annotation[end - blockStart + 1]);
\r
if (end > blockStart)
\r
{
\r
annels.addElement(els = new Annotation[end - blockStart + 1]);
\r
- if (end - blockStart + 1 <= alignmentAnnotation.annotations.length)
\r
+ if ((els.length+blockStart)<= alignmentAnnotation.annotations.length)
\r
{
\r
{
\r
+ // copy just the visible segment of the annotation row
\r
System.arraycopy(alignmentAnnotation.annotations, blockStart,
\r
els, 0, els.length);
\r
}
\r
else
\r
{
\r
System.arraycopy(alignmentAnnotation.annotations, blockStart,
\r
els, 0, els.length);
\r
}
\r
else
\r
{
\r
+ // copy to the end of the annotation row
\r
System.arraycopy(alignmentAnnotation.annotations, blockStart,
\r
System.arraycopy(alignmentAnnotation.annotations, blockStart,
\r
- els, 0, (end - blockStart + 1));
\r
+ els, 0, (alignmentAnnotation.annotations.length - blockStart));
\r
}
\r
w += els.length;
\r
}
\r
}
\r
w += els.length;
\r
}
\r