From 27f51f19a31e2d2cb3543ae858b248c91c1e9428 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 1 May 2007 13:40:02 +0000 Subject: [PATCH] Multiple views/hidden region/undo out of index bug --- src/jalview/appletgui/PaintRefresher.java | 6 +++--- src/jalview/gui/PaintRefresher.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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; } } -- 1.7.10.2