Currently, when you click on a container, there is no restriction on how many times the click triggers. So, if update runs more than once while you are clicking, you can select, deselect, and select again multiple times. This results in several clicks being immediately undone. In order to prevent this, I would usually use a 'last_mouse1down' variable to hold whether the mouse button was also pressed last update, but if there is a nice pythony way to do this already, it would be better.
Currently, when you click on a container, there is no restriction on how many times the click triggers. So, if update runs more than once while you are clicking, you can select, deselect, and select again multiple times. This results in several clicks being immediately undone. In order to prevent this, I would usually use a 'last_mouse1down' variable to hold whether the mouse button was also pressed last update, but if there is a nice pythony way to do this already, it would be better.