From: amwaterhouse Date: Thu, 8 Sep 2005 15:48:45 +0000 (+0000) Subject: Correct mouse pressed bug X-Git-Tag: Release_2_05b~59 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=481f2cbd12ab5527f2d86bf9a08736f3d962cf19;p=jalview.git Correct mouse pressed bug --- diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 8a262d9..9c2aac0 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -92,6 +92,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, public void adjustPanelHeight() { // setHeight of panels + image = null; AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation(); int height = 0; @@ -332,7 +333,10 @@ public class AnnotationPanel extends JPanel implements MouseListener, for (int i = 0; i < aa.length; i++) { - height += aa[i].height; + if (aa[i].visible) + { + height += aa[i].height; + } if (evt.getY() < height) { @@ -634,6 +638,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, continue; } + if (row.isGraph) { // this is so that we draw the characters below the graph @@ -841,7 +846,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, } // used by overview window - public void drawGraph(Graphics g, AlignmentAnnotation aa, int width, int y) + public void drawGraph(Graphics g, AlignmentAnnotation aa, int width, int y, int sRes, int eRes) { g.setColor(Color.white); g.fillRect(0, 0, width, y); @@ -849,7 +854,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, int x = 0; - for (int j = 0; j < aa.annotations.length; j++) + for (int j = sRes; j < eRes; j++) { g.setColor(new Color(0, 0, 180));