Fix Reset Button for PaSiMap and issue with indelfreeAstr in AlignSeq
[jalview.git] / src / jalview / viewmodel / PaSiMapModel.java
index 4bb6d8a..4cc831a 100644 (file)
@@ -99,12 +99,12 @@ public class PaSiMapModel
 
     int width = pasimap.getWidth();
     int height = pasimap.getHeight();
-    top = height;
+    top = width;
 
     points = new Vector<>();
     Point[] scores = pasimap.getComponents(width - 1, width - 2, width - 3, 1);
 
-    for (int i = 0; i < top; i++)
+    for (int i = 0; i < height; i++)
     {
       SequencePoint sp = new SequencePoint(seqs[i], scores[i]);
       points.add(sp);
@@ -156,7 +156,7 @@ public class PaSiMapModel
     // note: actual indices for components are dim1-1, etc (patch for JAL-1123)
     Point[] scores = pasimap.getComponents(dim1 - 1, dim2 - 1, dim3 - 1, 1);
 
-    for (int i = 0; i < pasimap.getWidth(); i++)
+    for (int i = 0; i < pasimap.getHeight(); i++)
     {
       points.get(i).coord = scores[i];
     }