Skip to content
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

Add ability to delete grains in some dialogs #1259

Merged
merged 2 commits into from
Aug 25, 2022

Conversation

psavery
Copy link
Collaborator

@psavery psavery commented Jul 22, 2022

This adds the ability to delete grains in the fit grains options
dialog (before fit grains is ran), and in the fit grains results
dialog (after fit grains is ran).

The user may delete grains by right-clicking them in the table and
clicking "Delete grain(s)". Note that it is currently set up to not
allow the user to delete all grains.

@psavery
Copy link
Collaborator Author

psavery commented Jul 22, 2022

NOTE: we need to make sure hexrd's fit-grains will work for discontinuous grain ids (for instance, there are 3 grains, and the user deletes grain id 1, so there are grain ids 0 and 2 left) (see HEXRD/hexrd#453).

@joelvbernier
Copy link
Member

@psavery -- here is a proposed interim solution; upon deletion, can we just renumber the remaining grains in the table sequentially in the GUI form?

This adds the ability to delete grains in the fit grains options
dialog (before fit grains is ran), and in the fit grains results
dialog (after fit grains is ran).

The user may delete grains by right-clicking them in the table and
clicking "Delete grain(s)". Note that it is currently set up to not
allow the user to delete all grains.

Signed-off-by: Patrick Avery <[email protected]>
This is a great fix for the fact that hexrd expects the
grains to be sequentially numbered. We might be able to skip this in
the future if the requirement is removed from hexrd, but this works
fine for now.

Signed-off-by: Patrick Avery <[email protected]>
@psavery
Copy link
Collaborator Author

psavery commented Aug 25, 2022

@joelvbernier The fix seems to be working great!

@psavery psavery marked this pull request as ready for review August 25, 2022 21:49
@psavery psavery merged commit 773ce1c into HEXRD:master Aug 25, 2022
@psavery psavery deleted the delete-grains branch August 25, 2022 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants