This PR fixes a bug that causes the TrackScheme window to freeze after the following two steps:
Use "View > Show Only Selected Tracks"
Delete one of the visible root nodes
Here is a screen cast, demonstrating how to reproduce the problem:
The bug is triggered because the DefaultRootsModel and BranchTrackSchemeRootsModel keep a list of roots to be shown in the TrackScheme view. If one of the roots is removed from the ModelGraph, it becomes invalid, but the invalid entry still remains in the list of roots. The exception is triggered when the invalid object is processed by the PainterThread.
This PR fixes the bug, by removing the invalid entry from the list of roots as soon as the corresponding Spot is removed from the ModelGraph.
This PR fixes a bug that causes the TrackScheme window to freeze after the following two steps:
Here is a screen cast, demonstrating how to reproduce the problem:
The bug is triggered because the
DefaultRootsModel
andBranchTrackSchemeRootsModel
keep a list of roots to be shown in the TrackScheme view. If one of the roots is removed from theModelGraph
, it becomes invalid, but the invalid entry still remains in the list of roots. The exception is triggered when the invalid object is processed by thePainterThread
.This PR fixes the bug, by removing the invalid entry from the list of roots as soon as the corresponding Spot is removed from the
ModelGraph
.