Opened 8 years ago

Closed 8 years ago

#1053 closed defect (fixed)

Registered selectors not working on first use

Reported by: Tom Goddard Owned by: Conrad Huang
Priority: major Milestone: 0.6
Component: Tool Shed Version:
Keywords: Cc: Greg Couch
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

open 1a0m
show selAtoms
show selAtoms

should show all the atoms on the first "show selAtoms" call (this is the command run by the toolbar icon for showing atom) but it doesn't show the atoms until the second time. The selAtoms selector code in bundles/shortcuts/src/shortcuts.py, function _sel_atoms_selector() is not even being called on the first show command. Seems to be a problem with lazy initialization of bundle selectors.

Change History (5)

comment:1 by Greg Couch, 8 years ago

Conrad, is this related to the new atomspec triggers?

comment:2 by Conrad Huang, 8 years ago

It shouldn't be related. I thought I only added triggers for notification of atomspec evaluation and named selector registration/deregistration. Setting up selectors should be exactly the same.

comment:3 by Greg Couch, 8 years ago

Cc: Greg Couch added; Conrad Huang removed
Owner: changed from Greg Couch to Conrad Huang

Worked in Feb 22 build, so it must be from a recent change to selectors or bundles.

comment:4 by Tom Goddard, 8 years ago

Milestone: 0.6

comment:5 by Conrad Huang, 8 years ago

Resolution: fixed
Status: assignedclosed

Fixed in 3c8b57300.

Previously, only functions could be registered as named selectors. This was changed so that Objects instances can also be registered and used as is. That's when the bug was introduced.

Note: See TracTickets for help on using tickets.