From 7d4faec78c1f439321625557e09e574bc6211e8d Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 27 Oct 2006 16:15:58 +0000 Subject: [PATCH] -1 error --- src/jalview/gui/AnnotationPanel.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 844c1ab..417eb8c 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -509,12 +509,17 @@ public class AnnotationPanel extends JPanel implements MouseListener, } } + if(row==-1) + return; + int res = (evt.getX() / av.getCharWidth()) + av.getStartRes(); if(av.hasHiddenColumns) res = av.getColumnSelection().adjustForHiddenColumns(res); - if (row > -1 && res -1 + && res < (int) aa[row].annotations.length) { if(aa[row].graphGroup>-1) { -- 1.7.10.2