Fix T58439: Info Editor does not show operator reports immediately when
operator cancelled. Lots of operators return OPERATOR_CANCELLED when no data really changed. Reports from those operators do not show immediately in the Info Editor [they only do if the operator returns OPERATOR_FINISHED]. Now also notify the Info Editor in case of OPERATOR_CANCELLED. Maniphest Tasks: T58439 Differential Revision: https://developer.blender.org/D7238
This commit is contained in:
@@ -870,6 +870,10 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, bool ca
|
||||
}
|
||||
}
|
||||
|
||||
/* Refresh Info Editor with reports immediately, even if op returned OPERATOR_CANCELLED. */
|
||||
if ((retval & OPERATOR_CANCELLED) && !BLI_listbase_is_empty(&op->reports->list)) {
|
||||
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
|
||||
}
|
||||
/* if the caller owns them, handle this */
|
||||
wm_add_reports(op->reports);
|
||||
}
|
||||
|
Reference in New Issue
Block a user