Adds event for object.selected