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

Undo/redo of Add Hydrogens not "perfect" #6

Closed
ghutchis opened this issue May 12, 2007 · 4 comments
Closed

Undo/redo of Add Hydrogens not "perfect" #6

ghutchis opened this issue May 12, 2007 · 4 comments

Comments

@ghutchis
Copy link
Owner

Start with a molecule with some existing hydrogens (e.g., an imported crystal structure or PDB file), like the attached file. Add hydrogens. Try "undo" and all hydrogens are removed, including the original ones.

In short, for files with some existing hydrogens, "Add Hydrogens" and "Remove Hydrogens" are not perfect redo/undo pairs, since you will not get back to the original state.

Reported by: @ghutchis

@ghutchis
Copy link
Owner Author

Original comment by: @ghutchis

@ghutchis
Copy link
Owner Author

Logged In: YES
user_id=851435
Originator: NO

Would storing a copy of the original molecule and restoring that on undo not be a better solution? This is what other *Commands do to restore and it seems to work quite well.

Original comment by: @cryos

@ghutchis
Copy link
Owner Author

Logged In: YES
user_id=21420
Originator: YES

For now, this is probably the best approach. In my mind, it seems like we need something "smaller" than a molecule to keep a list of atoms and bonds to create or remove. However, OBMol doesn't have support for deleting or adding lists of atoms yet.

In the meantime, this is probably the best approach, yes.

Original comment by: @ghutchis

@ghutchis
Copy link
Owner Author

Logged In: YES
user_id=21420
Originator: YES

This is fixed in SVN trunk (I guess by cryos, but I can't find the fix in the ChangeLog).

Marking this closed.

Original comment by: @ghutchis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant