save an undo point when an inspector is closed