﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
1059	"""changes"" trigger is not firing correctly"	Tristan Croll	Eric Pettersen	"
{{{
def print_structure_changes(trigger_name, changes):
    print('Structure changes: {}'.format(changes[1].atom_reasons()))

def print_global_changes(trigger_name, changes):
    print('Global changes: {}'.format(changes.atom_reasons()))

m = session.models.list()[0]
from chimerax.atomic import get_triggers

h1 = m.triggers.add_handler('changes', print_structure_changes)
h2 = get_triggers(session).add_handler('changes', print_global_changes)

m.atoms.coords += 1
# Nothing prints

session.change_tracker.changes
# Now the following prints to the log:
# Global changes: ['coord changed']
# Structure changes: ['coord changed']
# Global changes: []

m.atoms.coords += 1
m.atoms.displays = True
# Nothing prints

session.change_tracker.changes
# Global changes: ['coord changed', 'display changed', 'hide changed']
Structure changes: ['coord changed', 'display changed', 'hide changed']
# Global changes: []

}}}

I'm quite heavily reliant on the 'changes' trigger, so this is a blocker for me."	defect	closed	blocker		Core		fixed						all	ChimeraX
