From: kiramt Date: Wed, 15 Nov 2017 13:23:00 +0000 (+0000) Subject: JAL-2811 Updated following review X-Git-Tag: Release_2_10_3b1~28^2~2^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fbug%2FJAL-2811;p=jalview.git JAL-2811 Updated following review --- 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(); } } }