JAL-3400 prevent duplications in View Chain menu
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 29 Jun 2020 09:25:06 +0000 (10:25 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 29 Jun 2020 09:25:06 +0000 (10:25 +0100)
src/jalview/gui/StructureViewerBase.java

index 77ba38d..1bb651a 100644 (file)
@@ -1053,7 +1053,10 @@ public abstract class StructureViewerBase extends GStructureViewer
       repaint();
       return;
     }
-    setChainMenuItems(binding.getChainNames());
+    synchronized (chainMenu)
+    {
+      setChainMenuItems(binding.getChainNames());
+    }
 
     this.setTitle(binding.getViewerTitle(getViewerName(), true));