Merge branch 'bug/JAL-3099alignmentVisibleWidth' into merge/JAL-3099
[jalview.git] / src / jalview / datamodel / Alignment.java
index 3e0856a..0f51b7e 100755 (executable)
@@ -720,31 +720,17 @@ public class Alignment implements AlignmentI
   
     return maxLength;
   }
-  /*
+
   @Override
-  public int getWidth()
+  public int getVisibleWidth()
   {
-    final Wrapper temp = new Wrapper();
-  
-    forEachSequence(new Consumer<SequenceI>()
+    int w = getWidth();
+    if (hiddenCols != null)
     {
-      @Override
-      public void accept(SequenceI s)
-      {
-        if (s.getLength() > temp.inner)
-        {
-          temp.inner = s.getLength();
-        }
-      }
-    }, 0, sequences.size() - 1);
-  
-    return temp.inner;
+      w -= hiddenCols.getSize();
+    }
+    return w;
   }
-  
-  public static class Wrapper
-  {
-    public int inner;
-  }*/
 
   /**
    * DOCUMENT ME!