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:
authorCampbell Barton <ideasman42@gmail.com>2018-04-05 14:41:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-05 14:41:52 +0300
commitcd474b913b3fa1f55c1df17520a652950a38c03d (patch)
tree2cc28b92be925313ce63c63673f2abe97cc6eecf /source/blender/editors
parent47b6e23271b51429d45434e02ba137b8fdac3b45 (diff)
ED_undo: use logging
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/undo/ed_undo.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c
index 4f62e38dc0b..09abc1f3878 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -33,6 +33,8 @@
#include "MEM_guardedalloc.h"
+#include "CLG_log.h"
+
#include "DNA_scene_types.h"
#include "BLI_utildefines.h"
@@ -60,6 +62,9 @@
#include "UI_interface.h"
#include "UI_resources.h"
+/** We only need this locally. */
+static CLG_LogRef LOG = {"ed.undo"};
+
/* -------------------------------------------------------------------- */
/** \name Generic Undo System Access
*
@@ -68,9 +73,8 @@
void ED_undo_push(bContext *C, const char *str)
{
- if (G.debug & G_DEBUG) {
- printf("%s: %s\n", __func__, str);
- }
+ CLOG_INFO(&LOG, 1, "name='%s'", str);
+
const int steps = U.undosteps;
if (steps <= 0) {
@@ -97,6 +101,7 @@ void ED_undo_push(bContext *C, const char *str)
/* note: also check undo_history_exec() in bottom if you change notifiers */
static int ed_undo_step(bContext *C, int step, const char *undoname)
{
+ CLOG_INFO(&LOG, 1, "name='%s', step=%d", undoname, step);
wmWindowManager *wm = CTX_wm_manager(C);
wmWindow *win = CTX_wm_window(C);
// Main *bmain = CTX_data_main(C);
@@ -307,6 +312,7 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op)
int ret = 0;
if (op) {
+ CLOG_INFO(&LOG, 1, "idname='%s'", op->type->idname);
wmWindowManager *wm = CTX_wm_manager(C);
struct Scene *scene = CTX_data_scene(C);
@@ -367,9 +373,7 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op)
CTX_wm_region_set(C, ar);
}
else {
- if (G.debug & G_DEBUG) {
- printf("redo_cb: ED_undo_operator_repeat called with NULL 'op'\n");
- }
+ CLOG_WARN(&LOG, "called with NULL 'op'");
}
return ret;