From 3e1ab9b2afc225abc8263c8a60ea582850b3bb36 Mon Sep 17 00:00:00 2001 From: kiramt Date: Thu, 17 Aug 2017 09:02:34 +0100 Subject: [PATCH] JAL-2665 Correct position of selection switching from wrap to normal --- src/jalview/gui/SeqCanvas.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 9bd38c5..0b0166b 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -1053,6 +1053,12 @@ public class SeqCanvas extends JComponent implements ViewportListenerI return null; } + if (!av.getWrapAlignment()) + { + LABEL_EAST = 0; + LABEL_WEST = 0; + } + // set up drawing colour Graphics2D g = (Graphics2D) selectionImage.getGraphics(); g.translate(LABEL_WEST, 0); @@ -1119,6 +1125,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI } } g.translate(-LABEL_WEST, 0); + g.dispose(); return selectionImage; } -- 1.7.10.2