showAutocalculatedAbove = Cache.getDefault(
Preferences.SHOW_AUTOCALC_ABOVE, false);
viewStyle.setScaleProteinAsCdna(Cache.getDefault(
- Preferences.SCALE_PROTEIN_TO_CDNA, false));
+ Preferences.SCALE_PROTEIN_TO_CDNA, true));
}
void init()
// TODO: create undo object for this JAL-1101
/*
- * If one alignment is protein and one nucleotide, with at least one
- * sequence name in common, offer to open a linked alignment.
+ * If any cDNA/protein mappings can be made between the alignments, offer to
+ * open a linked alignment with split frame option.
*/
- if (AlignmentUtils.isMappable(al, getAlignment()))
+ if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, false))
{
- if (openLinkedAlignment(al, title))
+ if (AlignmentUtils.isMappable(al, getAlignment()))
{
- return;
+ if (openLinkedAlignment(al, title))
+ {
+ return;
+ }
}
}
+
+ /*
+ * No mappings, or offer declined - add sequences to this alignment
+ */
// TODO: JAL-407 regardless of above - identical sequences (based on ID and
// provenance) should share the same dataset sequence
{
getAlignment().addSequence(al.getSequenceAt(i));
}
- // TODO this call was done by SequenceFetcher but not FileLoader or
- // CutAndPasteTransfer. Is it needed?
- // JBPComment: this repositions the view to show the new sequences
- // JBPComment: so it is needed for UX
+
setEndSeq(getAlignment().getHeight());
firePropertyChange("alignment", null, getAlignment().getSequences());
}
/**
* Show a dialog with the option to open and link (cDNA <-> protein) as a new
- * alignment. Returns true if the new alignment was opened, false if not,
- * because the user declined the offer.
+ * alignment, either as a standalone alignment or in a split frame. Returns
+ * true if the new alignment was opened, false if not, because the user
+ * declined the offer.
*
+ * @param al
* @param title
*/
protected boolean openLinkedAlignment(AlignmentI al, String title)