From: amwaterhouse Date: Tue, 1 May 2007 13:40:02 +0000 (+0000) Subject: Multiple views/hidden region/undo out of index bug X-Git-Tag: Release_2_3~93 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=27f51f19a31e2d2cb3543ae858b248c91c1e9428;p=jalview.git Multiple views/hidden region/undo out of index bug --- diff --git a/src/jalview/appletgui/PaintRefresher.java b/src/jalview/appletgui/PaintRefresher.java index f7bec98..7e0edf7 100755 --- a/src/jalview/appletgui/PaintRefresher.java +++ b/src/jalview/appletgui/PaintRefresher.java @@ -182,7 +182,7 @@ public class PaintRefresher if (!exists) { - if (i < jSize) + if (i < comp.getHeight()) { comp.getSequences().insertElementAt(a1[i], i); } @@ -191,8 +191,6 @@ public class PaintRefresher comp.addSequence(a1[i]); } - jSize++; - if (comp.getHiddenSequences().getSize() > 0) { a2 = comp.getHiddenSequences().getFullAlignment().getSequencesArray(); @@ -201,6 +199,8 @@ public class PaintRefresher { a2 = comp.getSequencesArray(); } + + jSize = a2.length; } } diff --git a/src/jalview/gui/PaintRefresher.java b/src/jalview/gui/PaintRefresher.java index 1b25385..c6d3b58 100755 --- a/src/jalview/gui/PaintRefresher.java +++ b/src/jalview/gui/PaintRefresher.java @@ -178,7 +178,7 @@ public class PaintRefresher if (!exists) { - if (i < jSize) + if (i < comp.getHeight()) { comp.getSequences().insertElementAt(a1[i], i); } @@ -187,8 +187,6 @@ public class PaintRefresher comp.addSequence(a1[i]); } - jSize++; - if (comp.getHiddenSequences().getSize() > 0) { a2 = comp.getHiddenSequences().getFullAlignment().getSequencesArray(); @@ -197,6 +195,8 @@ public class PaintRefresher { a2 = comp.getSequencesArray(); } + + jSize = a2.length; } }