- AlignFrame af = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
- AlignFrame.DEFAULT_HEIGHT);
+
+ AlignFrame af;
+ if (source instanceof ComplexAlignFile)
+ {
+ ColumnSelection colSel = ((ComplexAlignFile) source)
+ .getColumnSelection();
+ SequenceI[] hiddenSeqs = ((ComplexAlignFile) source)
+ .getHiddenSequences();
+ boolean showSeqFeatures = ((ComplexAlignFile) source)
+ .isShowSeqFeatures();
+ ColourSchemeI cs = ((ComplexAlignFile) source).getColourScheme();
+ FeaturesDisplayedI fd = ((ComplexAlignFile) source)
+ .getDisplayedFeatures();
+ af = new AlignFrame(al, hiddenSeqs, colSel,
+ AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
+ af.getViewport().setShowSequenceFeatures(showSeqFeatures);
+ af.getViewport().setFeaturesDisplayed(fd);
+ af.changeColour(cs);
+ }
+ else
+ {
+ af = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
+ AlignFrame.DEFAULT_HEIGHT);
+ }
+