Sets proper states for the delete and cancel buttons