Opened 8 years ago

Closed 6 years ago

#1029 closed task (fixed)

nucleotides undo

Reported by: Elaine Meng Owned by: Greg Couch
Priority: major Milestone: 0.91
Component: Depiction Version:
Keywords: Cc: Conrad Huang
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Make nucleotides work with undo.

Change History (7)

comment:1 by Greg Couch, 6 years ago

Milestone: 0.9

comment:2 by Conrad Huang, 6 years ago

Milestone: 0.90.91

comment:3 by Greg Couch, 6 years ago

Initial undo support is in. There a few oddities that are related:

  1. If the initial display has nucleotides, then there is an undo action. This is because the initial display uses the nucleotide command code. This undo action should be suppressed and/or subsumed into an undo action of the entire initial display.
  1. When 2hem is opened, there are 9 undo's, one for each model. All can can be done, but only one redo can be done. This is an undo stack bug, but would be masked if (1) is changed.

comment:4 by Greg Couch, 6 years ago

Ignore (2). That was a bug in the nucleotides redo code. The redo was creating a new undo, which truncates the undo stack.

comment:5 by Greg Couch, 6 years ago

Turns out that the undo code is incomplete. In particular, the hide bits are not always restored correctly. So needs more work.

comment:6 by Greg Couch, 6 years ago

Fixed the hide bits for atoms.

The last remaining bit to working about is restoring the state of the shown_when_atoms_hidden flag for hydrogen bonds. It is set to false for interresidue h-bonds when the nucleic representation hides the base atoms. And true otherwise.

shown_when_atoms_hidden is not a bit mask, so it's not possible to play fair with other code. Maybe change nucleotides to set and forget shown_when_atoms_hidden? That is, never set it back to true?

Last edited 6 years ago by Greg Couch (previous) (diff)

comment:7 by Greg Couch, 6 years ago

Resolution: fixed
Status: assignedclosed

Simplified code to set shown_when_atoms_hidden to false for hydrogen bonds in nucleotide residues to non-backbone atoms. This is due to not computing the coordinate of the hidden atoms on the nucleotide representation -- only ribbon backbone atoms have that privilege. So if the atom is not hidden, then the hydrogen bonds are visible. And if not, it isn't (otherwise the hydrogen bonds would often be disconnected). So nothing to undo.

Note: See TracTickets for help on using tickets.