From a5741a64054ad42d0c950ba655bf7fdfda5bfd15 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Tue, 4 Aug 2015 16:16:48 +0100 Subject: [PATCH] JAL-1821 updated implementation of launchStructureViewer method to use currently selected sequences instead of trying to collate them from the viewport (as suggested by Jim) --- src/jalview/gui/StructureChooser.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index f456817..d5e4cbc 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -790,8 +790,18 @@ public class StructureChooser extends GStructureChooser StructureViewer sViewer = new StructureViewer(ssm); if (pdbEntriesToView.length > 1) { - sViewer.viewStructures(pdbEntriesToView, alignPanel.av.collateForPDB(pdbEntriesToView), + ArrayList seqsMap = new ArrayList(); + for (SequenceI seq : sequences) + { + seqsMap.add(new SequenceI[] + { seq }); + } + SequenceI[][] collatedSeqs = seqsMap.toArray(new SequenceI[0][0]); + sViewer.viewStructures(pdbEntriesToView, collatedSeqs, alignPanel); + // sViewer.viewStructures(pdbEntriesToView, + // alignPanel.av.collateForPDB(pdbEntriesToView), + // alignPanel); } else { -- 1.7.10.2