From f51f5302101389c1ffd7ed8bba0b79705b289a70 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 3 Aug 2017 17:27:14 +0200 Subject: [PATCH] JAL-2609 process only up to end of alignment when shifting sequences --- src/jalview/gui/SeqCanvas.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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) { -- 1.7.10.2