findingFeatures flag set
authoramwaterhouse <Andrew Waterhouse>
Mon, 14 Aug 2006 12:30:58 +0000 (12:30 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 14 Aug 2006 12:30:58 +0000 (12:30 +0000)
src/jalview/gui/FeatureRenderer.java

index 44bd151..5843844 100755 (executable)
@@ -177,6 +177,7 @@ public class FeatureRenderer
           || newFeatureAdded)\r
        {\r
          findAllFeatures();\r
+         newFeatureAdded = false;\r
          if(av.featuresDisplayed.size()<1)\r
            return;\r
 \r
@@ -333,15 +334,21 @@ public class FeatureRenderer
       }\r
     }\r
 \r
-    synchronized public void featuresAdded()\r
+\r
+    public void featuresAdded()\r
     {\r
       newFeatureAdded = true;\r
       findAllFeatures();\r
-      newFeatureAdded = false;\r
     }\r
 \r
+   boolean findingFeatures = false;\r
    synchronized void findAllFeatures()\r
    {\r
+\r
+      if(findingFeatures)\r
+        return;\r
+\r
+      findingFeatures = true;\r
       jalview.schemes.UserColourScheme ucs = new\r
           jalview.schemes.UserColourScheme();\r
 \r
@@ -394,6 +401,8 @@ public class FeatureRenderer
         renderOrder[i] = en.nextElement().toString();\r
         i--;\r
       }\r
+\r
+      findingFeatures = false;\r
     }\r
 \r
     public Color getColour(String featureType)\r