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-01-19 13:07:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-19 13:07:43 +0300
commit0cddc7e300fd90cdc6dd8ca8dafca21e8ccfa8a9 (patch)
treec98c3eb906074903946a51884cabf716c6a82d88 /source/blender/windowmanager
parent53e062da941c25050074493651e5a8c48ea13c6b (diff)
WM: operator flag to check repeat/redo execution
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index ed56586711d..61c144a63d4 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -802,14 +802,22 @@ static int wm_operator_exec(bContext *C, wmOperator *op, const bool repeat, cons
return retval;
if (op->type->exec) {
- if (op->type->flag & OPTYPE_UNDO)
+ if (op->type->flag & OPTYPE_UNDO) {
wm->op_undo_depth++;
+ }
+ if (repeat) {
+ op->flag |= OP_IS_REPEAT;
+ }
retval = op->type->exec(C, op);
OPERATOR_RETVAL_CHECK(retval);
+ if (repeat) {
+ op->flag &= ~OP_IS_REPEAT;
+ }
- if (op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
+ if (op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm) {
wm->op_undo_depth--;
+ }
}
/* XXX Disabled the repeat check to address part 2 of #31840.