JAL-1321 don't show a tooltip for empty strings
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Tue, 18 Jun 2013 20:28:57 +0000 (21:28 +0100)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Tue, 18 Jun 2013 20:28:57 +0000 (21:28 +0100)
src/jalview/gui/OptsAndParamsPage.java

index eab240f..d5da323 100644 (file)
@@ -109,7 +109,7 @@ public class OptsAndParamsPage
 
         enabled.setToolTipText("<html>"
                 + JvSwingUtils
-                        .wrapTooltip(((desc == null) ? "see further details by right-clicking"
+                        .wrapTooltip(((desc == null || desc.trim().length()==0) ? "see further details by right-clicking"
                                 : desc)
                                 + "<br><img src=\"" + linkImageURL + "\"/>")
                 + "</html>");
@@ -117,7 +117,7 @@ public class OptsAndParamsPage
       }
       else
       {
-        if (desc != null)
+        if (desc != null && desc.trim().length()>0)
         {
           enabled.setToolTipText("<html>"
                   + JvSwingUtils.wrapTooltip(opt.getDescription())