From: amwaterhouse Date: Thu, 26 Oct 2006 09:39:01 +0000 (+0000) Subject: Check if hiddenSequence has been deleted X-Git-Tag: Release_2_2~226 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5cf622544aaa7453e5e1710186b53734334783d6;p=jalview.git Check if hiddenSequence has been deleted --- 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); + } } }