From 41e1e412121ed83380bd33fcb9e3969dc055aa4c Mon Sep 17 00:00:00 2001 From: jprocter Date: Sun, 28 Oct 2007 13:12:57 +0000 Subject: [PATCH] begin process of allowing for column selection in wrapped mode. --- src/jalview/appletgui/SeqPanel.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index a010364..158f0ab 100755 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -550,7 +550,16 @@ public class SeqPanel int findSeq(MouseEvent evt) { - + final int sqnum = findAlRow(evt); + return (sqnum<0) ? 0 : sqnum; + } + /** + * + * @param evt + * @return row in alignment that was selected (or -1 for column selection) + */ + private int findAlRow(MouseEvent evt) + { int seq = 0; int y = evt.getY(); @@ -571,7 +580,7 @@ public class SeqPanel av.alignment.getHeight() - 1); if (seq < 0) { - seq = 0; + seq = -1; } } else @@ -580,7 +589,7 @@ public class SeqPanel av.alignment.getHeight() - 1); if (seq < 0) { - seq = 0; + seq = -1; } } -- 1.7.10.2