CompEvol / BeastFX

GUIs for BEAST using Java FX to make things more pretty.
GNU Lesser General Public License v2.1
4 stars 2 forks source link

BEAUti cloning of clocks sometimes clones tree prior #34

Open rbouckaert opened 1 year ago

rbouckaert commented 1 year ago

To replicate:

Several PIOMSCoalescentDistributions appear while there should be only one.

rbouckaert commented 1 year ago

Marking the PIOMSCoalescentDistributions not cloneable by overriding notCloneable like so:

 @Override
   public boolean notCloneable() {
        return true;
    }

fixes the issue. It feels that it may be too hard to make the logic in BeautiDoc.deepCopyPlugin work it out by itself.

bjoelle commented 1 year ago

FYI I've had the same issue with an FBD tree prior being cloned (I imported two partitions, then accidentally linked the clock model, and when unlinking I got two tree priors) so it doesn't seem limited to STACEY.

rbouckaert commented 1 year ago

Thanks for the bug report. Now wondering whether perhaps the TreeDistribution or the FBD tree prior should have the same notClonable method as PIOMSCoalescentDistributions to get around this.