mastodon-sc / mastodon

Mastodon – a large-scale tracking and track-editing framework for large, multi-view images.
BSD 2-Clause "Simplified" License
66 stars 20 forks source link

Branch Graph TrackScheme functionality gets lost after a `BranchGraph.graphRebuilt()` #176

Closed maarzt closed 2 years ago

maarzt commented 2 years ago

I noticed the problem with the newly added branch graph and hierarchy track scheme. After changing the ModelGraph, by removing and adding edges, and triggering a BranchGraphSynchronizer.graphRebuilt() the branch graph TrackScheme loses parts of it's functionality:

  1. The arrow keys (left, right, up, down) are no longer responsive. (This issue likely also affects the dev branch)
  2. And the view does not update, whenever there is only downward track shown, see https://github.com/mastodon-sc/mastodon/pull/174.
tinevez commented 2 years ago

Tested on my Mac.

Things work in the dev branch. In the branch-graph-rendering things work also provided that the special display mode (display only track below) is not selected.

But indeed, if we select 'display tracks downward' and modify the graph, then the bug described above happens. Interestingly, it goes away if we switch back to the normal view.

tinevez commented 2 years ago

It seems that it is the focus and/or highlight system that is fscked up.

maarzt commented 2 years ago

You are right the dev branch works. The only problem is with the newly added display model. I also found to root of the problem :) There is a list of roots in the LineageTreeLayoutImp it needs to be replace with a proper RootsModel. This RootsModel needs to work similar to the SelectionModelAdapter. I have a fix already, just need to push it.

maarzt commented 2 years ago

This issue is fixed in commit https://github.com/mastodon-sc/mastodon/pull/174/commits/0a015af1f1afab10e62e455a059d53ecac688ad6