From 5cf622544aaa7453e5e1710186b53734334783d6 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 26 Oct 2006 09:39:01 +0000 Subject: [PATCH] Check if hiddenSequence has been deleted --- src/jalview/datamodel/HiddenSequences.java | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/jalview/datamodel/HiddenSequences.java b/src/jalview/datamodel/HiddenSequences.java index 9a4e7c6..31eda50 100755 --- a/src/jalview/datamodel/HiddenSequences.java +++ b/src/jalview/datamodel/HiddenSequences.java @@ -73,9 +73,12 @@ public class HiddenSequences for (int i = 0; i < hiddenSequences.length; i++) { + if(hiddenSequences[i]==null) + continue; + if (i > deletionIndex) tmp[i-1] = hiddenSequences[i]; - else if(hiddenSequences[i]!=null) + else tmp[i] = hiddenSequences[i]; } @@ -158,12 +161,17 @@ public class HiddenSequences if(seq!=null) { - revealedSeqs.addElement(seq); - alignment.getSequences().insertElementAt(seq, alignmentIndex); - if(repSequence!=null) - { - repSequence.showHiddenSequence(seq); - } + if(seq.getLength()>0) + { + revealedSeqs.addElement(seq); + alignment.getSequences().insertElementAt(seq, alignmentIndex); + } + else + System.out.println(seq.getName()+" has been deleted"); + if (repSequence != null) + { + repSequence.showHiddenSequence(seq); + } } } -- 1.7.10.2