From: kiramt Date: Fri, 17 Nov 2017 12:14:59 +0000 (+0000) Subject: Merge branch 'develop' into bug/JAL-2837 X-Git-Tag: Release_2_10_3b1~23^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fbug%2FJAL-2837;p=jalview.git Merge branch 'develop' into bug/JAL-2837 Conflicts: src/jalview/gui/SeqPanel.java --- 66e2ef1a1a7767b8ca8d40f108f29e9036166236 diff --cc src/jalview/gui/SeqPanel.java index d8d674f,e11af48..2cdb1d8 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@@ -409,14 -417,30 +417,33 @@@ public class SeqPanel extends JPane } else { - av.getRanges().scrollToVisible(seqCanvas.cursorX, seqCanvas.cursorY); + if (av.getWrapAlignment()) + { - av.getRanges().scrollToWrappedVisible(seqCanvas.cursorX); ++ // scrollToWrappedVisible expects x-value to have hidden cols subtracted ++ int x = av.getAlignment().getHiddenColumns() ++ .findColumnPosition(seqCanvas.cursorX); ++ av.getRanges().scrollToWrappedVisible(x); + } + else + { + av.getRanges().scrollToVisible(seqCanvas.cursorX, + seqCanvas.cursorY); + } } - setStatusMessage(av.getAlignment().getSequenceAt(seqCanvas.cursorY), + + if (av.getAlignment().getHiddenColumns().isVisible(seqCanvas.cursorX)) + { + setStatusMessage(av.getAlignment().getSequenceAt(seqCanvas.cursorY), seqCanvas.cursorX, seqCanvas.cursorY); + } - seqCanvas.repaint(); + if (repaintNeeded) + { + seqCanvas.repaint(); + } } + void setSelectionAreaAtCursor(boolean topLeft) { SequenceI sequence = av.getAlignment().getSequenceAt(seqCanvas.cursorY);