Opened 3 years ago
Closed 3 years ago
#7566 closed defect (fixed)
pseudobonds unexpectedly not displayed
Reported by: | pett | Owned by: | pett |
---|---|---|---|
Priority: | moderate | Milestone: | |
Component: | Graphics | Version: | |
Keywords: | Cc: | Tom Goddard | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
Open 1a0m and use the Sticks preset, then:
view /B:5
altlocs change B /B:5
hbonds /B:5 & @@num_alt_locs>1 interModel false twoColors true reveal true
(no H-bonds found)
altlocs change A /B:5
hbonds /B:5 & @@num_alt_locs>1 interModel false twoColors true reveal true
The last hbonds command finds 4 hydrogen bonds but none are displayed. The display attributes for the group and the individual pseudobonds are True. If you select the pseudobonds and toggle their display attributes off and on, then they show up (I used the Model Panel to select the group, and the Selection Inspector to toggle the display attributes).
Change History (2)
comment:1 by , 3 years ago
Cc: | added |
---|---|
Owner: | changed from | to
comment:2 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The graphics_changes()->set_gc_adddel() was missing from the Pseudobond constructor, which explains why the bug only manifested when coming from an empty group because in that case no pseudobonds were being destroyed -- the proper call was in the destructor.
Curious. It only fails to display if the first hbonds command that makes no hbonds is run before the second hbonds command. That first hbonds command creates an empty hbonds pseudobond group. Apparently the second hbonds command just uses that existing empty group and adds 4 pseudobonds. It looks like in the C++ code the pseudobond group change tracker is not notified when a new pseudobond is created -- that is why the graphics does not update. The new_pseudobond() method has to call I think graphics_changes()->set_gc_adddel(). Actually it looks like that is not the right call because PBGroup has some fancy base class stuff. But basically the C++ needs to set graphics changes on both add and delete of pseudobonds to get the graphics to update.
I'll let you fix that C++.