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 17:19:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-05 17:19:43 +0300
commit3eaf77fdd34bd9517b650cabde3574361bdc8d21 (patch)
tree5565b616ce36e6716c6f9ebe78ecb42bda078da1 /source/blender/editors/undo
parent1c1dc394662965356eee2347d824026cd9d18756 (diff)
parentad1ea9a427e3543a43ca2589f87f0c94b9be03ca (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/undo')
-rw-r--r--source/blender/editors/undo/ed_undo.c16
-rw-r--r--source/blender/editors/undo/undo_system_types.c2
2 files changed, 11 insertions, 7 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;
diff --git a/source/blender/editors/undo/undo_system_types.c b/source/blender/editors/undo/undo_system_types.c
index f1ef444337c..4dbd22d6d22 100644
--- a/source/blender/editors/undo/undo_system_types.c
+++ b/source/blender/editors/undo/undo_system_types.c
@@ -62,7 +62,7 @@ void ED_undosys_type_init(void)
BKE_UNDOSYS_TYPE_PAINTCURVE = BKE_undosys_type_append(ED_paintcurve_undosys_type);
/* Text editor */
- BKE_undosys_type_append(ED_text_undosys_type);
+ BKE_UNDOSYS_TYPE_TEXT = BKE_undosys_type_append(ED_text_undosys_type);
/* Keep global undo last (as a fallback). */
BKE_UNDOSYS_TYPE_MEMFILE = BKE_undosys_type_append(ED_memfile_undosys_type);