X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFeatureRenderer.java;h=a1de62e32e04b55c9a784222d380eaad92610fe4;hb=990fd5f012601024aaeeb09e2901791d242636c4;hp=178dc385d1dee01edaec6d24c1f62417848ace18;hpb=289b85072928342dc4f22d3747a3c249d403a688;p=jalview.git diff --git a/src/jalview/gui/FeatureRenderer.java b/src/jalview/gui/FeatureRenderer.java index 178dc38..a1de62e 100755 --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@ -49,7 +49,7 @@ public class FeatureRenderer // A higher level for grouping features of a // particular type - Hashtable featureGroups = null; + Hashtable featureGroups = new Hashtable(); // This is actually an Integer held in the hashtable, // Retrieved using the key feature type @@ -397,13 +397,16 @@ public class FeatureRenderer * them. Then fires a PropertyChangeEvent on the changeSupport object. * */ - synchronized void findAllFeatures() + void findAllFeatures() { - findAllFeatures(true); // add all new features as visible - if (!firing) { - firing=true; - changeSupport.firePropertyChange("changeSupport",null,null); - firing=false; + synchronized (firing) + { + if (firing.equals(Boolean.FALSE)) { + firing=Boolean.TRUE; + findAllFeatures(true); // add all new features as visible + changeSupport.firePropertyChange("changeSupport",null,null); + firing=Boolean.FALSE; + } } } /** @@ -455,6 +458,7 @@ public class FeatureRenderer { if (!av.featuresDisplayed.containsKey(features[index].getType())) { + if(featureGroups.containsKey(features[index].getType())) { boolean visible = ( (Boolean) featureGroups.get( @@ -462,8 +466,6 @@ public class FeatureRenderer if(!visible) { - System.out.println(features[index].featureGroup - +" not visible"); index++; continue; } @@ -495,7 +497,7 @@ public class FeatureRenderer updateRenderOrder(allfeatures); findingFeatures = false; } - protected boolean firing=false; + protected Boolean firing=Boolean.FALSE; /** * replaces the current renderOrder with the unordered features in allfeatures. * The ordering of any types in both renderOrder and allfeatures is preserved,