JAL-3490 match count independent of contiguous matches count
[jalview.git] / src / jalview / appletgui / AlignmentPanel.java
index 906acc1..365f886 100644 (file)
@@ -73,23 +73,6 @@ public class AlignmentPanel extends Panel
   // this value is set false when selection area being dragged
   boolean fastPaint = true;
 
-  @Override
-  public void finalize() throws Throwable
-  {
-    alignFrame = null;
-    av = null;
-    vpRanges = null;
-    seqPanel = null;
-    seqPanelHolder = null;
-    sequenceHolderPanel = null;
-    scalePanel = null;
-    scalePanelHolder = null;
-    annotationPanel = null;
-    annotationPanelHolder = null;
-    annotationSpaceFillerHolder = null;
-    super.finalize();
-  }
-
   public AlignmentPanel(AlignFrame af, final AlignViewport av)
   {
     try
@@ -361,7 +344,7 @@ public class AlignmentPanel extends Panel
           int verticalOffset, boolean redrawOverview, boolean centre)
   {
     // do we need to scroll the panel?
-    if (results != null && results.getSize() > 0)
+    if (results != null && results.getCount() > 0)
     {
       AlignmentI alignment = av.getAlignment();
       int seqIndex = alignment.findIndex(results);
@@ -438,8 +421,8 @@ public class AlignmentPanel extends Panel
     if (av.hasHiddenColumns())
     {
       AlignmentI al = av.getAlignment();
-      start = al.getHiddenColumns().findColumnPosition(ostart);
-      end = al.getHiddenColumns().findColumnPosition(end);
+      start = al.getHiddenColumns().absoluteToVisibleColumn(ostart);
+      end = al.getHiddenColumns().absoluteToVisibleColumn(end);
       if (start == end)
       {
         if (!scrollToNearest && !al.getHiddenColumns().isVisible(ostart))
@@ -686,14 +669,9 @@ public class AlignmentPanel extends Panel
     }
     else
     {
-      int width = av.getAlignment().getWidth();
+      int width = av.getAlignment().getVisibleWidth();
       int height = av.getAlignment().getHeight();
 
-      if (av.hasHiddenColumns())
-      {
-        width = av.getAlignment().getHiddenColumns()
-                .findColumnPosition(width);
-      }
       if (x < 0)
       {
         x = 0;