From: Jim Procter Date: Fri, 11 Oct 2013 16:20:08 +0000 (+0100) Subject: JAL-1164 regression on JAL-1292 use bitset to mark graphGroup as rendered X-Git-Tag: Release_2_8_0b1~1^2~44^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a16fd1b3b74c14b058b297a91d48de0dd85f2a0d;p=jalview.git JAL-1164 regression on JAL-1292 use bitset to mark graphGroup as rendered --- diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index dc352f4..dca968e 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -41,6 +41,7 @@ import jalview.workers.ConsensusThread; import jalview.workers.StrucConsensusThread; import java.util.ArrayList; +import java.util.BitSet; import java.util.Hashtable; import java.util.List; import java.util.Map; @@ -1413,7 +1414,7 @@ public abstract class AlignmentViewport implements AlignViewportI int charHeight = getCharHeight(); if (aa != null) { - boolean graphgrp[] = null; + BitSet graphgrp = new BitSet(); for (int i = 0; i < aa.length; i++) { if (aa[i] == null) @@ -1427,17 +1428,13 @@ public abstract class AlignmentViewport implements AlignViewportI } if (aa[i].graphGroup > -1) { - if (graphgrp == null) - { - graphgrp = new boolean[aa.length]; - } - if (graphgrp[aa[i].graphGroup]) + if (graphgrp.get(aa[i].graphGroup)) { continue; } else { - graphgrp[aa[i].graphGroup] = true; + graphgrp.set(aa[i].graphGroup); } } aa[i].height = 0;