From: gmungoc Date: Fri, 19 Jun 2015 16:11:17 +0000 (+0100) Subject: JAL-892 check viewer is linked to alignment panel on save to XML X-Git-Tag: Release_2_10_0~598 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ced9774e6ac645ef1b231e560fcf5f70a4e44263;p=jalview.git JAL-892 check viewer is linked to alignment panel on save to XML --- diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 8dfe839..0ebc804 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -868,7 +868,7 @@ public class Jalview2XML } } - saveRnaViewers(jout, jseq, jds, viewIds, storeDS); + saveRnaViewers(jout, jseq, jds, viewIds, ap, storeDS); jms.addJSeq(jseq); } @@ -1365,10 +1365,12 @@ public class Jalview2XML * @param jseq * @param jds * @param viewIds + * @param ap * @param storeDataset */ protected void saveRnaViewers(JarOutputStream jout, JSeq jseq, - final SequenceI jds, List viewIds, boolean storeDataset) + final SequenceI jds, List viewIds, AlignmentPanel ap, + boolean storeDataset) { JInternalFrame[] frames = Desktop.desktop.getAllFrames(); for (int f = frames.length - 1; f > -1; f--) @@ -1376,11 +1378,12 @@ public class Jalview2XML if (frames[f] instanceof AppVarna) { AppVarna varna = (AppVarna) frames[f]; - if (varna.isListeningFor(jds)) + /* + * link the sequence to every viewer that is showing it and is linked to + * its alignment panel + */ + if (varna.isListeningFor(jds) && ap == varna.getAlignmentPanel()) { - /* - * link the sequence to every viewer that is showing it - */ String viewId = varna.getViewId(); RnaViewer rna = new RnaViewer(); rna.setViewId(viewId);