WM: Support showing reports for modal operators
This isn't common use, but modal operators may make reports while they're running. Now they're displayed in the info header.
This commit is contained in:
parent
499bde8105
commit
f6ff8f27e3
|
@ -1691,8 +1691,15 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
|
|||
if (ot->flag & OPTYPE_UNDO)
|
||||
wm->op_undo_depth--;
|
||||
|
||||
if (retval & (OPERATOR_CANCELLED | OPERATOR_FINISHED))
|
||||
if (retval & (OPERATOR_CANCELLED | OPERATOR_FINISHED)) {
|
||||
wm_operator_reports(C, op, retval, false);
|
||||
}
|
||||
else {
|
||||
/* not very common, but modal operators may report before finishing */
|
||||
if (!BLI_listbase_is_empty(&op->reports->list)) {
|
||||
wm_add_reports(op->reports);
|
||||
}
|
||||
}
|
||||
|
||||
/* important to run 'wm_operator_finished' before NULLing the context members */
|
||||
if (retval & OPERATOR_FINISHED) {
|
||||
|
|
Loading…
Reference in New Issue