Remove empty() from feature ToolTip
authoramwaterhouse <Andrew Waterhouse>
Tue, 3 Oct 2006 09:20:53 +0000 (09:20 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 3 Oct 2006 09:20:53 +0000 (09:20 +0000)
src/jalview/appletgui/SeqPanel.java

index 7d614e7..5ecc613 100755 (executable)
@@ -415,6 +415,8 @@ public class SeqPanel
 \r
 \r
       int cwidth = seqCanvas.getWrappedCanvasWidth(getSize().width);\r
+      if(cwidth<1)\r
+        return 0;\r
 \r
       wrappedBlock = y / cHeight;\r
       wrappedBlock += av.getStartRes() / cwidth;\r
@@ -565,7 +567,9 @@ public class SeqPanel
 \r
         if (sf.getValue("status") != null )\r
         {\r
-          featureText.append(" (" + sf.getValue("status") + ")");\r
+          String status = sf.getValue("status").toString();\r
+          if(status.length()>0)\r
+            featureText.append(" (" + sf.getValue("status") + ")");\r
         }\r
         featureText.append("\n");\r
 \r
@@ -990,7 +994,7 @@ public class SeqPanel
     {\r
         seq.insertCharAt(j, av.getGapCharacter());\r
         seqEditOccurred = true;\r
-    }\r
+   }\r
 \r
     void insertChar(int j, SequenceI seq, int fixedColumn)\r
     {\r
@@ -1032,7 +1036,6 @@ public class SeqPanel
             "End editing: Tried removing residue " + seq.getCharAt(j));\r
         return;\r
       }\r
-\r
       seq.deleteCharAt(j);\r
       seq.insertCharAt(fixedColumn, av.getGapCharacter());\r
       seqEditOccurred = true;\r