From: kiramt Date: Fri, 18 Aug 2017 08:13:57 +0000 (+0100) Subject: JAL-2665 Comments X-Git-Tag: Release_2_10_3b1~140^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=41367efddf5d0c0d4ef89d97ec88d2d6b50ba74a;p=jalview.git JAL-2665 Comments --- diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index d5b27f8..b6153a8 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -443,12 +443,9 @@ public class SeqCanvas extends JComponent implements ViewportListenerI return lcimg; } - private void paintSeqGroup() - { - fastPaint = true; - repaint(); - } - + /* + * Set up a buffered image of the correct height and size for the sequence canvas + */ private BufferedImage setupImage() { BufferedImage lcimg = null; @@ -472,7 +469,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI { System.gc(); System.err.println( - "Selection Group image OutOfMemory Redraw Error.\n" + er); + "Group image OutOfMemory Redraw Error.\n" + er); new OOMWarning("Creating alignment image for display", er); return null; @@ -1142,6 +1139,8 @@ public class SeqCanvas extends JComponent implements ViewportListenerI sx = 0; } + // don't let width extend beyond current block, or group extent + // fixes JAL-2672 if (sx + xwidth >= (endRes - startRes + 1) * charWidth) { xwidth = (endRes - startRes + 1) * charWidth - sx; @@ -1232,7 +1231,8 @@ public class SeqCanvas extends JComponent implements ViewportListenerI if (eventName.equals(SequenceGroup.SEQ_GROUP_CHANGED)) { - paintSeqGroup(); + fastPaint = true; + repaint(); } else if (av.getWrapAlignment()) {