TreeViewer icon indicating copy to clipboard operation
TreeViewer copied to clipboard

TreeViewer removes edits when reshaped

Open ethering opened this issue 3 years ago • 2 comments

If I edit my tree, e.g. by changing the node labels from 'length' to 'support', or by editing the font of the leaf labels, and then view the tree as a different style (e.g. changing from rooted to unrooted), all my edits are lost, even after going back to the original style. It would be really helpful if these edited features remained stored, similar to what happens when 'Further transformations' are applied. Thanks for the great tools though!

ethering avatar Jul 27 '21 10:07 ethering

Yes, that's normal: clicking on one of the tree style buttons is equivalent to removing all current plot action modules, changing the coordinates module to the right one (based on the button) and then re-adding the branches and labels. This is meant essentially as a quick way to show the tree when it's first opened or to fix the plot if it gets messed up.

If you wish to just reshape the tree without changing other settings, you should change the coordinates module to the one you want to use, and then go through the plot actions and, for those that have a "branch reference" parameter or something similar, change that as well.

Thanks for pointing this out though, I could create a new "Reshape tree" module that does this automatically 🤔

arklumpus avatar Jul 27 '21 13:07 arklumpus

Update: TreeViewer v2.0.0 now includes a Reshape tree module that adds a button that you can use to reshape the tree while preserving other changes to the module parameters.

The Rooted style, Unrooted style and Circular style buttons are still there, though now they issue a warning if they think that by enabling them you might be losing some customisations.

arklumpus avatar Oct 09 '21 04:10 arklumpus

Hi, I think the Reshape tree module should do the job, so I am closing this - feel free to reopen or open a new issue if you still have questions!

arklumpus avatar Mar 24 '23 19:03 arklumpus