Queueing the drawing of related tabs and tree levels with a queue_events function