Don't report the python code for operators type which don't have the

'REGISTER' flag set.
This commit is contained in:
Matt Ebb
2010-06-06 08:52:33 +00:00
parent 8adf33c8a4
commit b4f12db4ec

View File

@@ -392,11 +392,13 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int pop
if(retval & OPERATOR_FINISHED) {
if(G.f & G_DEBUG)
wm_operator_print(op); /* todo - this print may double up, might want to check more flags then the FINISHED */
/* Report the python string representation of the operator */
buf = WM_operator_pystring(C, op->type, op->ptr, 1);
BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf);
MEM_freeN(buf);
if (op->type->flag & OPTYPE_REGISTER) {
/* Report the python string representation of the operator */
buf = WM_operator_pystring(C, op->type, op->ptr, 1);
BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf);
MEM_freeN(buf);
}
}
if (op->reports->list.first) {