From a16fd1b3b74c14b058b297a91d48de0dd85f2a0d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 11 Oct 2013 17:20:08 +0100 Subject: [PATCH] JAL-1164 regression on JAL-1292 use bitset to mark graphGroup as rendered --- src/jalview/viewmodel/AlignmentViewport.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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; -- 1.7.10.2