JetBrains-Research / jbr

JBR Genome Browser
https://doi.org/10.1093/bioinformatics/btab376
11 stars 0 forks source link

Add autoscale and group scale to undo/redo history #275

Closed Xewar313 closed 4 months ago

Xewar313 commented 5 months ago

Currently, autoscale and group scale actions are not stored in history, and we would like to be able to undo/redo them.

Most problems stem from the fact that group scale is calculated once, basing on initially provided tracks, and after track removal and undoing their removal we may not have all tracks to properly recalculate the scale. There are also some bugs with removing some part of grouped tracks that could result in scale deadlocking on calculation.

Current changes include addition of dedicated commands, and caching previous results that could allow them to be readded after undoing the action. However, I suspect that the simplest and best solution would be to completely redesign how group scales are implemented, so that they are more atomic and less dependent on some unseen global state