Multiple views/hidden region/undo out of index bug
authoramwaterhouse <Andrew Waterhouse>
Tue, 1 May 2007 13:40:02 +0000 (13:40 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 1 May 2007 13:40:02 +0000 (13:40 +0000)
src/jalview/appletgui/PaintRefresher.java
src/jalview/gui/PaintRefresher.java

index f7bec98..7e0edf7 100755 (executable)
@@ -182,7 +182,7 @@ public class PaintRefresher
 \r
       if (!exists)\r
       {\r
-        if (i < jSize)\r
+        if (i < comp.getHeight())\r
         {\r
           comp.getSequences().insertElementAt(a1[i], i);\r
         }\r
@@ -191,8 +191,6 @@ public class PaintRefresher
           comp.addSequence(a1[i]);\r
         }\r
 \r
-        jSize++;\r
-\r
         if (comp.getHiddenSequences().getSize() > 0)\r
         {\r
           a2 = comp.getHiddenSequences().getFullAlignment().getSequencesArray();\r
@@ -201,6 +199,8 @@ public class PaintRefresher
         {\r
           a2 = comp.getSequencesArray();\r
         }\r
+\r
+        jSize = a2.length;\r
       }\r
     }\r
 \r
index 1b25385..c6d3b58 100755 (executable)
@@ -178,7 +178,7 @@ public class PaintRefresher
 \r
       if (!exists)\r
       {\r
-        if (i < jSize)\r
+        if (i < comp.getHeight())\r
         {\r
           comp.getSequences().insertElementAt(a1[i], i);\r
         }\r
@@ -187,8 +187,6 @@ public class PaintRefresher
           comp.addSequence(a1[i]);\r
         }\r
 \r
-        jSize++;\r
-\r
         if (comp.getHiddenSequences().getSize() > 0)\r
         {\r
           a2 = comp.getHiddenSequences().getFullAlignment().getSequencesArray();\r
@@ -197,6 +195,8 @@ public class PaintRefresher
         {\r
           a2 = comp.getSequencesArray();\r
         }\r
+\r
+        jSize = a2.length;\r
       }\r
     }\r
 \r