#4466 closed defect (fixed)
"color single" command is not undoable
Reported by: | Elaine Meng | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Depiction | Version: | |
Keywords: | Cc: | pett | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The command "color #1 purple" is undoable but "color single #1 purple" is not. Since we expect the latter to be used a fair amount via Model Panel, it should be undoable.
The "color image" command is also undoable but I would put that one as very low priority since it is not used much. Also it has its own undo method, although not working at the moment, ticket #4465.
tested in daily build
UCSF ChimeraX version: 1.2.dev202104030245 (2021-04-03)
Change History (4)
comment:1 by , 5 years ago
Cc: | added |
---|
comment:2 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed.
I removed the color option to color single because it was confusing -- it as doing what Model Panel does to set a model color. Now "color single" only turns off vertex coloring and that does handle undo.
follow-up: 3 comment:3 by , 5 years ago
I verified that "file none" now works. However, it was somewhat of a surprise that the surface changed to stark white instead of its original color. Just remarking, not demanding a change...
follow-up: 4 comment:4 by , 5 years ago
When "color image" is used to texture map a surface the single color modulates (multiplies times) the image colors so to make the image show its normal colors that command sets the single color to white. If you then change the single color to red you will see the green and blue components of the texture image disappear. This can sometimes be a handy way to modulate the texture image colors. But when you remove the texture coloring the original single color from before the color image command has been lost -- it is white. So not a bug, a feature, but maybe a bad feature.
The primary use case of color single is to turn off per-vertex coloring. For that case undo works.
For other cases each model decides what it does by defining the "single_color" attribute which can be set. There is no API which defines how to undo that so it currently is not feasible to undo in general.
I think probably the most practical solution is that Model Panel should use "color #1 purple" for atomic models. Also probably Volume models. In fact I am not clear why Model Panel is using "single_color" in any case.