empress icon indicating copy to clipboard operation
empress copied to clipboard

Possible for Empress tree coloring to break when using timed events in Empire plots

Open fedarko opened this issue 2 years ago • 0 comments

Steps to reproduce

  1. Start some sort of event in Emperor that only lasts for a specific duration (e.g. using the mouse to draw a box that selects a group of samples, or double-clicking a sample metadata category in Emperor). This will adjust the tree coloring (as expected), and clear the previous tree coloring (as expected).

  2. Quickly, while this event is still ongoing, apply sample or feature metadata coloring in Empress.

  3. When the Emperor tree coloring is automatically ended at the end of its duration, the Empress tree coloring selected in step 2 will now unexpectedly be removed. However, the main tree coloring legend will remain (which might confuse users). There also won't be an Update button visible in the selected tree coloring panel in Empress any more (the user will have to un-check then re-check the Color by... box).

Screencaptures

Example with double-clicking a sample metadata category in Emperor:

asdf

Example with selecting a group of samples in Emperor:

huhuhuhuh

Notes

I think the way to fix this is adjusting the Empress tree coloring operations so that they automatically remove any callbacks that have been set? (And, I guess, these should also remove special styling applied to Emperor -- e.g. as soon as the user changes the tree coloring in Empress, if there are any samples in Emperor that are highlighted due to being selected using mouse draging then these samples should be un-highlighted.) But I'm not sure exactly how it'd be best to handle this.

This isn't a very important issue since you have to basically try to mess things up. However, it'd still be good to make sure this is taken care of...

fedarko avatar Jul 31 '21 20:07 fedarko