From f941283dbf6f88b3a3973cbea908f8bdef387a3c Mon Sep 17 00:00:00 2001 From: kiramt Date: Wed, 15 Nov 2017 13:23:00 +0000 Subject: [PATCH] JAL-2811 Updated following review --- src/jalview/gui/SeqCanvas.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 7f5756d..2f4a89a 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -412,8 +412,12 @@ public class SeqCanvas extends JComponent implements ViewportListenerI g.drawImage(lcimg, 0, 0, this); } - drawCursor(g, ranges.getStartRes(), ranges.getEndRes(), - ranges.getStartSeq(), ranges.getEndSeq()); + + if (av.cursorMode) + { + drawCursor(g, ranges.getStartRes(), ranges.getEndRes(), + ranges.getStartSeq(), ranges.getEndSeq()); + } } /** @@ -1265,7 +1269,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI .findIndexWithoutHiddenSeqs(cursorY); // don't do work unless we have to - if (av.cursorMode && cursor_ypos >= startSeq && cursor_ypos <= endSeq) + if (cursor_ypos >= startSeq && cursor_ypos <= endSeq) { int yoffset = 0; int xoffset = 0; @@ -1322,7 +1326,6 @@ public class SeqCanvas extends JComponent implements ViewportListenerI seqRdr.drawCursor(g, s, xoffset + (cursor_xpos - startx) * av.getCharWidth(), yoffset + (cursor_ypos - startSeq) * av.getCharHeight()); - g.dispose(); } } } -- 1.7.10.2