Cleanup: add CTX_wm_operator_poll_msg_clear

Call this function instead of `CTX_wm_operator_poll_msg_set(C, NULL)`
This commit is contained in:
2021-04-20 11:42:00 +10:00
parent 795f024558
commit 985ccba77c
5 changed files with 16 additions and 5 deletions

View File

@@ -950,7 +950,7 @@ static uiTooltipData *ui_tooltip_data_from_button(bContext *C, uiBut *but)
/* if operator poll check failed, it can give pretty precise info why */
if (but->optype) {
CTX_wm_operator_poll_msg_set(C, NULL);
CTX_wm_operator_poll_msg_clear(C);
WM_operator_poll_context(C, but->optype, but->opcontext);
disabled_msg = CTX_wm_operator_poll_msg_get(C);
}