-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Fix segment disappearing when sharing segment editor node betwee…
…n widgets When a single vtkMRMLSegmentEditorNode was used by multiple qSlicerSegmentEditorWidget instances then after using Threshold effect, the current segment disappeared from slice views. The reason was that Threshold effects in every segment editor widgets get activated (via sharing the segment editor node) and they all started preview, saved original segment opacity, and then on "Apply" restored the original segment opacity. However, the segment opacity that was restored by second, third, etc. effects were not the original anymore, but it was already the opacity that was set to 0 (it has to be set to 0 to prevent the current segment occluding the preview). The solution could have been to store the original opacity in a shared location (e.g., in the segment editor node), but that would not have solved the slight rendering issue (preview glow was darker) and performance degradation caused by several effects showing the preview glow at the same time. Fixed it by storing the object ID of the threshold effect that manipulates the segmentation display node in the node's "SegmentEditor.PreviewingEffect" attribute. All other Threshold effects check this attribute and if they find that another effect already provide preview then they don't display the preview. This commit also fixes disappearing segment when selecting another segmentation node while the Threshold effect is active. fixes #6874
- Loading branch information
Showing
1 changed file
with
88 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters