cancelling an operator popup now calls the operators cancel callback.

This commit is contained in:
Campbell Barton
2013-10-30 23:15:27 +00:00
parent 7267221715
commit bd17d2371f

View File

@@ -1396,12 +1396,19 @@ static uiBlock *wm_operator_ui_create(bContext *C, ARegion *ar, void *userData)
return block;
}
static void wm_operator_ui_popup_cancel(struct bContext *UNUSED(C), void *userData)
static void wm_operator_ui_popup_cancel(struct bContext *C, void *userData)
{
wmOpPopUp *data = userData;
if (data->free_op && data->op) {
wmOperator *op = data->op;
WM_operator_free(op);
wmOperator *op = data->op;
if (op) {
if (op->type->cancel) {
op->type->cancel(C, op);
}
if (data->free_op) {
WM_operator_free(op);
}
}
MEM_freeN(data);