From: amwaterhouse Date: Tue, 7 Nov 2006 11:52:14 +0000 (+0000) Subject: Tidy up group size after alignmentChanged X-Git-Tag: Release_2_2~172 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f5a39f4861d0f1ffdb3c5b542e00907b2cc18a73;p=jalview.git Tidy up group size after alignmentChanged --- diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 0161517..b275611 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -1536,6 +1536,22 @@ public class AlignViewport updateConservation(ap); } + //Reset endRes of groups if beyond alignment width + int alWidth = alignment.getWidth(); + Vector groups = alignment.getGroups(); + if(groups!=null) + { + for(int i=0; ialWidth) + sg.setEndRes(alWidth-1); + } + } + + if(selectionGroup!=null && selectionGroup.getEndRes()>alWidth) + selectionGroup.setEndRes(alWidth-1); + resetAllColourSchemes(); alignment.adjustSequenceAnnotations();