JAL-2591 Removed getHiddenRegions()==null checks which are always false
[jalview.git] / src / jalview / appletgui / AnnotationColumnChooser.java
index 2acb568..0a4748c 100644 (file)
@@ -142,7 +142,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
     }
     setOldHiddenColumns(av.getAlignment().getHiddenColumns());
     adjusting = true;
-    Vector<String> list = new Vector<String>();
+    Vector<String> list = new Vector<>();
     int index = 1;
     for (int i = 0; i < anns.length; i++)
     {
@@ -298,10 +298,10 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
         HiddenColumns oldHidden = av
                 .getAnnotationColumnSelectionState()
                 .getOldHiddenColumns();
-        if (oldHidden != null && oldHidden.getListOfCols() != null
-                && !oldHidden.getListOfCols().isEmpty())
+        if (oldHidden != null
+                && !oldHidden.getHiddenRegions().isEmpty())
         {
-          for (Iterator<int[]> itr = oldHidden.getListOfCols()
+          for (Iterator<int[]> itr = oldHidden.getHiddenRegions()
                   .iterator(); itr.hasNext();)
           {
             int positions[] = itr.next();
@@ -444,7 +444,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
       // build filter params
       filterParams
               .setThresholdType(AnnotationFilterParameter.ThresholdType.NO_THRESHOLD);
-      if (getCurrentAnnotation().graph != AlignmentAnnotation.NO_GRAPH)
+      if (getCurrentAnnotation().isQuantitative())
       {
         filterParams
                 .setThresholdValue(getCurrentAnnotation().threshold.value);
@@ -598,7 +598,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
   {
     String currentView = AnnotationColumnChooser.NO_GRAPH_VIEW;
     if (av.getAlignment().getAlignmentAnnotation()[getAnnotations()
-            .getSelectedIndex()].graph != AlignmentAnnotation.NO_GRAPH)
+            .getSelectedIndex()].isQuantitative())
     {
       currentView = AnnotationColumnChooser.GRAPH_VIEW;
     }