From: gmungoc Date: Tue, 20 Jun 2017 09:35:25 +0000 (+0100) Subject: JAL-2526 don't retain lastColumnPosition from an invalidated cursor X-Git-Tag: Release_2_10_3b1~200 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=36c0fb5e4293dfa35454d0ab33059a38824aafc8;p=jalview.git JAL-2526 don't retain lastColumnPosition from an invalidated cursor --- diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 96747e4..783b1bc 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -723,7 +723,10 @@ public class Sequence extends ASequence implements SequenceI */ protected void updateCursor(int residuePos, int column, int startColumn) { - int endColumn = cursor == null ? 0 : cursor.lastColumnPosition; + /* + * preserve end residue column provided cursor was valid + */ + int endColumn = isValidCursor(cursor) ? cursor.lastColumnPosition : 0; if (residuePos == this.end) { endColumn = column;