Merge branch 'develop' into features/JAL-2609fastPaintWrapped
[jalview.git] / src / jalview / gui / SeqPanel.java
index e8cc68b..1e1af79 100644 (file)
@@ -215,7 +215,7 @@ public class SeqPanel extends JPanel
               + hgap + seqCanvas.getAnnotationHeight();
 
       int y = evt.getY();
-      y -= hgap;
+      y = Math.max(0, y - hgap);
       x = Math.max(0, x - seqCanvas.labelWidthWest);
 
       int cwidth = seqCanvas.getWrappedCanvasWidth(this.getWidth());