From: Jim Procter Date: Tue, 15 Apr 2014 17:43:34 +0000 (+0100) Subject: patch v2 for JAL-1474 add the newly recovered dataset sequence to the dataset current... X-Git-Tag: Jalview_2_9~123^2~45 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6002ac160ed8402d9d76bc75b3cb0875a0db08ac;p=jalview.git patch v2 for JAL-1474 add the newly recovered dataset sequence to the dataset currently being build/operated on if it isn't already present --- diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index c7fa090..ce42174 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -3737,6 +3737,20 @@ public class Jalview2XML if (sq != dsq) { // make this dataset sequence sq's dataset sequence sq.setDatasetSequence(dsq); + // and update the current dataset alignment + if (ds==null) { + if (dseqs!=null) { + if (!dseqs.contains(dsq)) + { + dseqs.add(dsq); + } + } else { + if (ds.findIndex(dsq)<0) + { + ds.addSequence(dsq); + } + } + } } } }