From: amwaterhouse Date: Tue, 6 Feb 2007 15:52:17 +0000 (+0000) Subject: Dont add null description to tooltip X-Git-Tag: Release_2_3~366 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9c41a929be328ca4c0039ae7594cf3925c1e03fe;p=jalview.git Dont add null description to tooltip --- diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 1ebabfe..0427ecb 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -492,6 +492,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, if (aa == null) { + this.setToolTipText(null); return; } @@ -514,7 +515,10 @@ public class AnnotationPanel extends JPanel implements MouseListener, } if(row==-1) - return; + { + this.setToolTipText(null); + return; + } int res = (evt.getX() / av.getCharWidth()) + av.getStartRes(); @@ -546,12 +550,16 @@ public class AnnotationPanel extends JPanel implements MouseListener, if(aa[row].annotations[res]!=null) { StringBuffer text = new StringBuffer("Sequence position " + - (res + 1) + " " + - aa[row].annotations[res].description); + (res + 1)); + + if (aa[row].annotations[res].description != null) + text.append(" " + aa[row].annotations[res].description); ap.alignFrame.statusBar.setText(text.toString()); } } + else + this.setToolTipText(null); } /**