From 961952081f8f5d5757933d71af98536701e400fe Mon Sep 17 00:00:00 2001 From: gmungoc Date: Sat, 23 Jan 2016 06:13:18 +0000 Subject: [PATCH] JAL-1705 copy 'show sequence features' setting in 'show products' --- src/jalview/gui/AlignFrame.java | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index aad93ee..e8eb03b 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -4789,14 +4789,13 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { al.addCodonFrame(acf); } - AlignFrame naf = new AlignFrame(al, DEFAULT_WIDTH, + AlignFrame newFrame = new AlignFrame(al, DEFAULT_WIDTH, DEFAULT_HEIGHT); - String newtitle = "" + ((dna) ? "Proteins" : "Nucleotides") - + " for " + ((isRegSel) ? "selected region of " : "") + String newtitle = "" + (dna ? "Proteins" : "Nucleotides") + + " for " + (isRegSel ? "selected region of " : "") + getTitle(); - naf.setTitle(newtitle); + newFrame.setTitle(newtitle); - // temporary flag until SplitFrame is released boolean asSplitFrame = Cache.getDefault( Preferences.ENABLE_SPLIT_FRAME, true); if (asSplitFrame) @@ -4827,9 +4826,13 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); copyThis.setTitle(AlignFrame.this.getTitle()); // SplitFrame with dna above, protein below - SplitFrame sf = new SplitFrame(dna ? copyThis : naf, - dna ? naf : copyThis); - naf.setVisible(true); + boolean showSequenceFeatures = viewport + .isShowSequenceFeatures(); + newFrame.setShowSeqFeatures(showSequenceFeatures); + copyThis.setShowSeqFeatures(showSequenceFeatures); + SplitFrame sf = new SplitFrame(dna ? copyThis : newFrame, + dna ? newFrame : copyThis); + newFrame.setVisible(true); copyThis.setVisible(true); String linkedTitle = MessageManager .getString("label.linked_view_title"); @@ -4837,7 +4840,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } else { - Desktop.addInternalFrame(naf, newtitle, DEFAULT_WIDTH, + Desktop.addInternalFrame(newFrame, newtitle, DEFAULT_WIDTH, DEFAULT_HEIGHT); } } -- 1.7.10.2