From b76d0ffcb6effa94954f75e030d1d67c890134eb Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 20 Aug 2010 14:56:26 +0000 Subject: [PATCH] avoid race condition by setting sequence logo flag directly rather than via accessor. See todo for further threadsafety --- src/jalview/gui/AlignViewport.java | 1 + src/jalview/gui/Jalview2XML.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 63695b6..eedc863 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -589,6 +589,7 @@ public class AlignViewport implements SelectionSource protected void updateAnnotation(boolean immediate) { + // TODO: make calls thread-safe, so if another thread calls this method, it will either return or wait until one calculation is finished. if (immediate || (!updatingConsensus && consensus != null && hconsensus != null)) { diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 4b6879c..fd93d7f 100755 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -2877,11 +2877,11 @@ public class Jalview2XML } if (view.hasShowSequenceLogo()) { - af.viewport.setShowSequenceLogo(view.getShowSequenceLogo()); + af.viewport.showSequenceLogo = view.getShowSequenceLogo(); } else { - af.viewport.setShowSequenceLogo(false); + af.viewport.showSequenceLogo = false; } if (view.hasShowDbRefTooltip()) { -- 1.7.10.2