From 4b65534cd7d7dad17375e16d38848a69f23882b4 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 13 Jan 2005 18:10:06 +0000 Subject: [PATCH] SequenceGroup is now an array --- src/jalview/gui/SeqCanvas.java | 4 +++- src/jalview/gui/SeqPanel.java | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 6639774..7f30c24 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -209,6 +209,7 @@ public class SeqCanvas extends JPanel SequenceI nextSeq; SequenceGroup group=null; + SequenceGroup [] groups=null; boolean inGroup=false; // are we in a defined group? boolean inRB=false; //Are we in a rubberband group? int sx=-1, sy=-1, ex=-1, ey=-1; @@ -219,8 +220,9 @@ public class SeqCanvas extends JPanel nextSeq = av.getAlignment().getSequenceAt(i); group = av.alignment.findGroup( nextSeq ); + groups = av.alignment.findAllGroups( nextSeq ); - sr.drawSequence(g, nextSeq, group,x1,x2, + sr.drawSequence(g, nextSeq, groups,x1,x2, (x1 - startx) * charWidth, offset + AlignmentUtil.getPixelHeight(starty, i, av.getCharHeight()), charWidth,charHeight,null, i); diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 9dcebd2..468fadb 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -333,6 +333,20 @@ public class SeqPanel extends JPanel || stretchGroup.getEndRes()= res) + { + stretchGroup = allGroups[i]; + av.setRubberbandGroup(stretchGroup); + break; + } } if(stretchGroup==null) -- 1.7.10.2