Resize image if id width changes
[jalview.git] / src / jalview / gui / IdCanvas.java
index 7734f9a..30152cc 100755 (executable)
@@ -183,7 +183,7 @@ public class IdCanvas extends JPanel
             return;\r
         }\r
 \r
-        if(oldHeight!=imgHeight)\r
+        if(oldHeight!=imgHeight || image.getWidth(this)!=getWidth())\r
         {\r
           image = new BufferedImage(getWidth(), imgHeight,\r
                                     BufferedImage.TYPE_INT_RGB);\r