From: amwaterhouse Date: Thu, 6 Apr 2006 09:24:42 +0000 (+0000) Subject: Must copy feature settings from one frame to another as they are not attached ot... X-Git-Tag: Release_2_08~50 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=688f6f0151570be3f3aa3b161963a0532d4bf775;p=jalview.git Must copy feature settings from one frame to another as they are not attached ot the dataset --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index ccf7303..0167b39 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -195,6 +195,11 @@ public class AlignFrame return jalview.bin.Cache.getProperty("VERSION"); } + public FeatureRenderer getFeatureRenderer() + { + return alignPanel.seqPanel.seqCanvas.getFeatureRenderer(); + } + public void fetchSequence_actionPerformed(ActionEvent e) { @@ -707,8 +712,9 @@ public class AlignFrame String newtitle = new String("Copied sequences"); //>>>This is a fix for the moment, until a better solution is found!!<<< - FeatureRenderer fr = af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer(); - fr.featureColours = alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featureColours; + af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().transferSettings( + alignPanel.seqPanel.seqCanvas.getFeatureRenderer()); + if (title.startsWith("Copied sequences")) { @@ -2355,6 +2361,7 @@ public class AlignFrame { // Add any Multiple Sequence Alignment Services final JMenu msawsmenu = new JMenu("Alignment"); + final AlignFrame af = this; for (int i = 0, j = msaws.size(); i < j; i++) { final ext.vamsas.ServiceHandle sh = (ext.vamsas.ServiceHandle) msaws. @@ -2366,7 +2373,7 @@ public class AlignFrame { SequenceI[] msa = gatherSequencesForAlignment(); new jalview.ws.MsaWSClient(sh, title, msa, - false, true, viewport.getAlignment().getDataset()); + false, true, viewport.getAlignment().getDataset(), af); } @@ -2383,7 +2390,7 @@ public class AlignFrame { SequenceI[] msa = gatherSequencesForAlignment(); new jalview.ws.MsaWSClient(sh, title, msa, - true, true, viewport.getAlignment().getDataset()); + true, true, viewport.getAlignment().getDataset(), af); } diff --git a/src/jalview/ws/MsaWSClient.java b/src/jalview/ws/MsaWSClient.java index 479f22f..59a858e 100755 --- a/src/jalview/ws/MsaWSClient.java +++ b/src/jalview/ws/MsaWSClient.java @@ -43,6 +43,7 @@ public class MsaWSClient * server is a WSDL2Java generated stub for an archetypal MsaWSI service. */ ext.vamsas.MuscleWS server; + AlignFrame alignFrame; /** @@ -56,10 +57,14 @@ public class MsaWSClient * @param preserveOrder DOCUMENT ME! */ - public MsaWSClient(ext.vamsas.ServiceHandle sh, String altitle, SequenceI[] msa, - boolean submitGaps, boolean preserveOrder, Alignment seqdataset) + public MsaWSClient(ext.vamsas.ServiceHandle sh, String altitle, + SequenceI[] msa, + boolean submitGaps, boolean preserveOrder, + Alignment seqdataset, + AlignFrame _alignFrame) { + alignFrame = _alignFrame; if (!sh.getAbstractName().equals("MsaWS")) { JOptionPane.showMessageDialog(Desktop.desktop, @@ -474,6 +479,10 @@ public class MsaWSClient } // TODO: JBPNote Should also rename the query sequence sometime... AlignFrame af = new AlignFrame(al); + + //>>>This is a fix for the moment, until a better solution is found!!<<< + alignFrame.getFeatureRenderer().transferSettings(af.getFeatureRenderer()); + af.addSortByOrderMenuItem(ServiceName + " Ordering", msaorder);