From: amwaterhouse Date: Tue, 15 Aug 2006 10:34:11 +0000 (+0000) Subject: Select revealed seqs X-Git-Tag: Release_2_1~62 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b169b1a49c078d123feb729db6acb9779f50e7d6;p=jalview.git Select revealed seqs --- diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index 99d0794..7c46cd9 100755 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -775,9 +775,23 @@ public class AlignViewport public void showSequence(int index) { - alignment.getHiddenSequences().showSequence(index); + Vector tmp = alignment.getHiddenSequences().showSequence(index); + if (tmp.size() > 0) + { + if (selectionGroup == null) + { + selectionGroup = new SequenceGroup(); + selectionGroup.setEndRes(alignment.getWidth() - 1); + } - if(alignment.getHiddenSequences().getSize()<1) + for (int t = 0; t < tmp.size(); t++) + { + selectionGroup.addSequence( + (SequenceI) tmp.elementAt(t), false + ); + } + } + if (alignment.getHiddenSequences().getSize() < 1) hasHiddenRows = false; } @@ -798,9 +812,20 @@ public class AlignViewport { if(alignment.getHiddenSequences().getSize()>0) { - alignment.getHiddenSequences().showAll(); + if(selectionGroup==null) + { + selectionGroup = new SequenceGroup(); + selectionGroup.setEndRes(alignment.getWidth()-1); + } + Vector tmp = alignment.getHiddenSequences().showAll(); + for(int t=0; t0) + { + if(selectionGroup==null) + { + selectionGroup = new SequenceGroup(); + selectionGroup.setEndRes(alignment.getWidth()-1); + } + for (int t = 0; t < tmp.size(); t++) + { + selectionGroup.addSequence( + (SequenceI) tmp.elementAt(t), false + ); + } + } if(alignment.getHiddenSequences().getSize()<1) hasHiddenRows = false; } @@ -1156,7 +1170,18 @@ public class AlignViewport { if(alignment.getHiddenSequences().getSize()>0) { - alignment.getHiddenSequences().showAll(); + if(selectionGroup==null) + { + selectionGroup = new SequenceGroup(); + selectionGroup.setEndRes(alignment.getWidth()-1); + } + Vector tmp = alignment.getHiddenSequences().showAll(); + for(int t=0; t