-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra undoState saved when redo is pressed on SegmentEditor #6183
Labels
Type: Bug
Something isn't working correctly
Comments
lassoan
added a commit
to lassoan/Slicer
that referenced
this issue
Feb 14, 2022
When save state is requested in vtkSegmentationHistory then the history must contain the current state and all previous states. This means that if save state is requested when the current state is already stored in the history then there is no need to save the state again (it would just result in having two identical states in the history). When a state is saved we also set the current state as last restored state. This avoids creation of an extra (identical) saved state when SaveState is called but the segmentation is not modified. Fixes Slicer#6183
Thank you for the clear error report, I've pushed a fix. |
lassoan
added a commit
to jamesobutler/Slicer
that referenced
this issue
Feb 16, 2022
When save state is requested in vtkSegmentationHistory then the history must contain the current state and all previous states. This means that if save state is requested when the current state is already stored in the history then there is no need to save the state again (it would just result in having two identical states in the history). When a state is saved we also set the current state as last restored state. This avoids creation of an extra (identical) saved state when SaveState is called but the segmentation is not modified. Fixes Slicer#6183
riep
pushed a commit
to riep/Slicer
that referenced
this issue
Apr 4, 2022
When save state is requested in vtkSegmentationHistory then the history must contain the current state and all previous states. This means that if save state is requested when the current state is already stored in the history then there is no need to save the state again (it would just result in having two identical states in the history). When a state is saved we also set the current state as last restored state. This avoids creation of an extra (identical) saved state when SaveState is called but the segmentation is not modified. Fixes Slicer#6183 (cherry picked from commit d547e8a)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Redo adds an extra undoState breaking up expected behaviour (and our customApp segmentEditor logic)
Steps to reproduce
Use a example CT on the segment editor module. Select Paint effect. Paint 3 separed lines (or brush strokes) on axial view, Press undo button (there will be 2 lines on the axial view). Paint another separed line (now there are 3 lines again) because of this action an extra undoState is added that means you need to press undoButton 3 times (the expected would be 2) to have only one line on the sliceView.
Environment
The text was updated successfully, but these errors were encountered: