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
JAL-4235 JAL-3599 Try and report Eclipse Product Version for jalviewjsTranspile....
[jalview.git]
/
src
/
jalview
/
datamodel
/
HiddenSequences.java
diff --git
a/src/jalview/datamodel/HiddenSequences.java
b/src/jalview/datamodel/HiddenSequences.java
index
a98b10e
..
b5efeb4
100755
(executable)
--- a/
src/jalview/datamodel/HiddenSequences.java
+++ b/
src/jalview/datamodel/HiddenSequences.java
@@
-157,9
+157,10
@@
public class HiddenSequences
int absAlignmentIndex = alignment.findIndex(sequence);
int alignmentIndex = adjustForHiddenSeqs(absAlignmentIndex);
int absAlignmentIndex = alignment.findIndex(sequence);
int alignmentIndex = adjustForHiddenSeqs(absAlignmentIndex);
- if (hiddenSequences[alignmentIndex] != null)
+ if (alignmentIndex < 0 || hiddenSequences[alignmentIndex] != null)
{
System.out.println("ERROR!!!!!!!!!!!");
{
System.out.println("ERROR!!!!!!!!!!!");
+ return;
}
hiddenSequences[alignmentIndex] = sequence;
}
hiddenSequences[alignmentIndex] = sequence;
@@
-221,8
+222,8
@@
public class HiddenSequences
end = hiddenSequences.length - 1;
}
end = hiddenSequences.length - 1;
}
- List<SequenceI> asequences;
- synchronized (asequences = alignment.getSequences())
+ List<SequenceI> asequences = alignment.getSequences();
+ synchronized (asequences)
{
for (int index = end; index > start; index--)
{
{
for (int index = end; index > start; index--)
{
@@
-238,8
+239,8
@@
public class HiddenSequences
}
else
{
}
else
{
- System.out.println(seq.getName()
- + " has been deleted whilst hidden");
+ System.out.println(
+ seq.getName() + " has been deleted whilst hidden");
}
}
}
}
}
}
@@
-253,7
+254,8
@@
public class HiddenSequences
}
/**
}
/**
- * Convert absolute alignment index to visible alignment index
+ * Convert absolute alignment index to visible alignment index (or -1 if
+ * before the first visible sequence)
*
* @param alignmentIndex
* @return
*
* @param alignmentIndex
* @return
@@
-310,7
+312,7
@@
public class HiddenSequences
return startRow - visibleDistance;
}
return startRow - visibleDistance;
}
- int index = startRow;
+ int index = Math.min(startRow, hiddenSequences.length - 1);
int count = 0;
while ((index > -1) && (count < visibleDistance))
{
int count = 0;
while ((index > -1) && (count < visibleDistance))
{