def METHOD_NAME(event):
    v = event["new"]
    action = event["name"]
    if action == "last_draw":
        state.selection = v["geometry"]
    elif action == "last_action" and v == "deleted":
        state.selection = None
    btn_done.disabled = state.selection is None