JAL-1989 more unit tests and encapsulation for ColumnSelection
[jalview.git] / src / jalview / renderer / AnnotationRenderer.java
index e5c2218..007df3e 100644 (file)
@@ -598,10 +598,8 @@ public class AnnotationRenderer
 
               if (columnSelection != null)
               {
-                for (int n = 0; n < columnSelection.size(); n++)
+                for (int v : columnSelection.getSelected())
                 {
-                  int v = columnSelection.columnAt(n);
-
                   if (v == column)
                   {
                     g.fillRect(x * charWidth, y, charWidth, charHeight);