Merged
Conversation
92badcc to
1db5c3d
Compare
1db5c3d to
5ed1740
Compare
5ed1740 to
094aa6e
Compare
psavery
reviewed
May 16, 2025
Collaborator
psavery
left a comment
There was a problem hiding this comment.
I wonder if we can just get rid of the "Remove Mask" buttons on each row, and rely on the "Remove Selected" instead. What do you think, @saransh13?
Overall, the code changes look good to me! Let us know what you think, Saransh.
| selected = self.ui.masks_tree.selectedItems() | ||
| self.ui.presentation_selector.setEnabled(len(selected) > 1) | ||
| self.ui.export_selected.setEnabled(len(selected) > 1) | ||
| self.ui.remove_selected.setEnabled(len(selected) > 1) |
Collaborator
There was a problem hiding this comment.
I would typically do something like this:
enable = len(selected) > 1
widgets = [
self.ui.presentation_selector,
self.ui.export_selected,
self.ui.remove_selected,
]
for w in widgets:
w.setEnabled(enable)But you do not have to change it!
Export all masks when the context menu is used and multiple masks are selected. Signed-off-by: Brianna Major <brianna.major@kitware.com>
Signed-off-by: Brianna Major <brianna.major@kitware.com>
- If more than one row is selected the combobox on the right will be enabled - If one or more of the selected masks are powder, laue, or threshold the options will be limited to "None" or "Visible". Otherwise the "Boundary only" and "Visible + Boundary" will also be options. - The changes are applied to all selected masks immediately Signed-off-by: Brianna Major <brianna.major@kitware.com>
- This is functionally the same as selecting multiple rows and using the context menu to export, just provides the option of a button if that is preferred over right-click - The button is only enabled when more than one row is selected Signed-off-by: Brianna Major <brianna.major@kitware.com>
Signed-off-by: Brianna Major <brianna.major@kitware.com>
Signed-off-by: Brianna Major <brianna.major@kitware.com>
Signed-off-by: Brianna Major <brianna.major@kitware.com>
Signed-off-by: Brianna Major <brianna.major@kitware.com>
094aa6e to
6779d71
Compare
Merged
saransh13
approved these changes
Jun 3, 2025
Member
saransh13
left a comment
There was a problem hiding this comment.
I'm approving the PR but will note that the mask to panel buffer is not working as expected. Since this is also a problem in master, we can fix that issue in a follow up PR.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
powder,laue, orthresholdthe options will be limited toNoneorVisible. Otherwise theBoundary onlyandVisible + Boundarywill also be options.Fixes #1846