Immediately apply "Show only selected nodes"
Summary:
The auto "Show only selected nodes" preference wasn't applied immediately and either nodes had to be added or the selection in the Segmentation View had to be changed to see the effect. It is now applied immediately and the code was refactored to get rid of any code duplication.
Fixes T29106
Test Plan:
- Open two different images and create segmentations for both images.
- Enable "Show only selected nodes" in the segmentation preferences and check if the visibility changes for the nodes are applied immediately.
- Switch reference images to check if the visibility of nodes is adjusted.
- Disable "Show only selected nodes" in the segmentation preferences
- Make all nodes visible and change reference image to check if the visibility of nodes do not change anymore
Reviewers: O1 MITK Reviewer Group I, s349i, kalali
Reviewed By: O1 MITK Reviewer Group I, kalali
Subscribers: kislinsk
Maniphest Tasks: T29106
Differential Revision: https://phabricator.mitk.org/D687