JAL-1705 copy feature settings when opening a split frame for show
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 29 Jan 2016 16:10:56 +0000 (16:10 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 29 Jan 2016 16:10:56 +0000 (16:10 +0000)
product

src/jalview/gui/AlignFrame.java

index 5ff7c6c..c047780 100644 (file)
@@ -4831,6 +4831,17 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
                       .isShowSequenceFeatures();
               newFrame.setShowSeqFeatures(showSequenceFeatures);
               copyThis.setShowSeqFeatures(showSequenceFeatures);
+              FeatureRenderer myFeatureStyling = alignPanel.getSeqPanel().seqCanvas
+                      .getFeatureRenderer();
+              /*
+               * copy feature rendering settings to split frame
+               */
+              newFrame.alignPanel.getSeqPanel().seqCanvas
+                      .getFeatureRenderer().transferSettings(
+                              myFeatureStyling);
+              copyThis.alignPanel.getSeqPanel().seqCanvas
+                      .getFeatureRenderer().transferSettings(
+                              myFeatureStyling);
               SplitFrame sf = new SplitFrame(dna ? copyThis : newFrame,
                       dna ? newFrame : copyThis);
               newFrame.setVisible(true);