Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm.c')
-rw-r--r--source/blender/windowmanager/intern/wm.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 048487fcd68..fcf8951d796 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -1,5 +1,5 @@
/**
- * $Id:
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -30,8 +30,6 @@
#include "DNA_windowmanager_types.h"
-#include "MEM_guardedalloc.h"
-
#include "GHOST_C-api.h"
#include "BLI_blenlib.h"
@@ -53,10 +51,11 @@
#include "wm_draw.h"
#include "wm.h"
+#include "MEM_guardedalloc.h"
+
#include "ED_screen.h"
#include "BPY_extern.h"
-#include "RNA_types.h"
/* ****************************************************** */
@@ -64,11 +63,14 @@
void WM_operator_free(wmOperator *op)
{
+
+#ifndef DISABLE_PYTHON
if(op->py_instance) {
/* do this first incase there are any __del__ functions or
* similar that use properties */
BPY_DECREF(op->py_instance);
}
+#endif
if(op->ptr) {
op->properties= op->ptr->data;
@@ -96,13 +98,18 @@ void WM_operator_free(wmOperator *op)
MEM_freeN(op);
}
+static void wm_reports_free(wmWindowManager *wm)
+{
+ BKE_reports_clear(&wm->reports);
+ WM_event_remove_timer(wm, NULL, wm->reports.reporttimer);
+}
+
/* all operations get registered in the windowmanager here */
/* called on event handling by event_system.c */
void wm_operator_register(bContext *C, wmOperator *op)
{
wmWindowManager *wm= CTX_wm_manager(C);
int tot;
- char *buf;
BLI_addtail(&wm->operators, op);
tot= BLI_countlist(&wm->operators);
@@ -114,14 +121,9 @@ void wm_operator_register(bContext *C, wmOperator *op)
tot--;
}
-
- /* Report the 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);
-
/* so the console is redrawn */
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ WM_event_add_notifier(C, NC_WM|ND_HISTORY, NULL);
}
@@ -135,6 +137,7 @@ void WM_operator_stack_clear(bContext *C)
WM_operator_free(op);
}
+ WM_event_add_notifier(C, NC_WM|ND_HISTORY, NULL);
}
/* ****************************************** */
@@ -305,7 +308,8 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
BLI_freelistN(&wm->paintcursors);
BLI_freelistN(&wm->drags);
- BKE_reports_clear(&wm->reports);
+
+ wm_reports_free(wm);
if(C && CTX_wm_manager(C)==wm) CTX_wm_manager_set(C, NULL);
}