From 34269ee3caf45d96ec5b4f99c973357459b04633 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 16 Mar 2015 17:34:58 +0000 Subject: [PATCH] JAL-845 tweaks and bug fixes for split frame view --- src/jalview/analysis/AlignmentUtils.java | 3 +++ src/jalview/gui/AlignFrame.java | 4 ++-- src/jalview/gui/AlignViewport.java | 1 - src/jalview/gui/SequenceFetcher.java | 8 ++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 988f2d1..337372d 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -452,6 +452,9 @@ public class AlignmentUtils if (translated == null || !(aaRes == translated.charAt(0))) { + // debug + System.out.println(("Mismatch at " + i + "/" + aaResidue + ": " + + codon + "(" + translated + ") != " + aaRes)); return false; } } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 4dc064d..5cc48fd 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -4796,8 +4796,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, boolean asSplitFrame = true; if (asSplitFrame) { - final Alignment copyAlignment = new Alignment( - AlignFrame.this.viewport.getAlignment()); + final Alignment copyAlignment = new Alignment(new Alignment( + AlignFrame.this.viewport.getSequenceSelection())); AlignFrame copyThis = new AlignFrame(copyAlignment, AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); copyThis.setTitle(AlignFrame.this.getTitle()); diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 289a0ea..405782d 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -1095,7 +1095,6 @@ public class AlignViewport extends AlignmentViewport implements : copyMe; AlignmentI protein = proteinFrame.viewport.getAlignment(); protein.setCodonFrames(mappings); - proteinFrame.viewport.initComplementConsensus(); cdnaFrame.setVisible(true); proteinFrame.setVisible(true); diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index 6c5d09a..72a7167 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -792,6 +792,10 @@ public class SequenceFetcher extends JPanel implements Runnable if (al != null && al.getHeight() > 0) { + if (title == null) + { + title = getDefaultRetrievalTitle(); + } if (alignFrame == null) { AlignFrame af = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH, @@ -804,10 +808,6 @@ public class SequenceFetcher extends JPanel implements Runnable // Alignments? } - if (title == null) - { - title = getDefaultRetrievalTitle(); - } SequenceFeature[] sfs = null; List alsqs; synchronized (alsqs = al.getSequences()) -- 1.7.10.2