JAL-1705 copy 'show sequence features' setting in 'show products'
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Sat, 23 Jan 2016 06:13:18 +0000 (06:13 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Sat, 23 Jan 2016 06:13:18 +0000 (06:13 +0000)
src/jalview/gui/AlignFrame.java

index aad93ee..e8eb03b 100644 (file)
@@ -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);
             }
           }