Skip to content

Commit

Permalink
robustify for drag/dropping alignments. fixes #72
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouckaert committed Jan 8, 2024
1 parent ef28a18 commit ddc55cb
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/beastfx/app/inputeditor/AlignmentListInputEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,22 @@ private void addItem(File[] fileArray) {
break;
}
}
alignments.add(likelihood.dataInput.get());
if (likelihood != null) {
alignments.add(likelihood.dataInput.get());
} else {
// alignment maybe wrapped in a FilteredAlignment
for (BEASTInterface o2 : b.getOutputs()) {
if (o2 instanceof FilteredAlignment) {
for (BEASTInterface o : ((FilteredAlignment) o2).getOutputs()) {
if (o instanceof GenericTreeLikelihood) {
likelihood = (GenericTreeLikelihood) o;
alignments.add(likelihood.dataInput.get());
break;
}
}
}
}
}
}
partitionCount = alignments.size();
tableData = null;
Expand Down

0 comments on commit ddc55cb

Please sign in to comment.