From: gmungoc Date: Thu, 3 Aug 2017 15:27:14 +0000 (+0200) Subject: JAL-2609 process only up to end of alignment when shifting sequences X-Git-Tag: Release_2_10_3b1~91^2~6^2~16 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f51f5302101389c1ffd7ed8bba0b79705b289a70;p=jalview.git JAL-2609 process only up to end of alignment when shifting sequences --- diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 12b426d..576d6ca 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -1505,8 +1505,15 @@ public class SeqCanvas extends JComponent implements ViewportListenerI { visibleWidths++; } - // todo limit visibleWidths to not exceed width of alignment - // (don't process white space below) + /* + * limit visibleWidths to not exceed width of alignment + */ + int maxWidths = (xMax - ranges.getStartRes()) / viewportWidth; + if (xMax % viewportWidth > 0) + { + maxWidths++; + } + visibleWidths = Math.min(visibleWidths, maxWidths); if (positions > 0) {