Page MenuHome
Paste P594

Proposed fix for T53786
ArchivedPublic

Authored by Campbell Barton (campbellbarton) on Jan 19 2018, 5:51 AM.
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 09835fa4229..6ca9485599c 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1936,7 +1936,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
// If modal, save settings back in scene if not set as operator argument
- if (t->flag & T_MODAL) {
+ if ((t->flag & T_MODAL) || (op->flag & OP_IS_REPEAT)) {
/* save settings if not set in operator */
/* skip saving proportional edit if it was not actually used */
@@ -1956,10 +1956,9 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
ts->proportional_objects = (proportional != PROP_EDIT_OFF);
}
- if ((prop = RNA_struct_find_property(op->ptr, "proportional_size")) &&
- !RNA_property_is_set(op->ptr, prop))
- {
- ts->proportional_size = t->prop_size;
+ if ((prop = RNA_struct_find_property(op->ptr, "proportional_size"))) {
+ ts->proportional_size =
+ RNA_property_is_set(op->ptr, prop) ? RNA_property_float_get(op->ptr, prop) : t->prop_size;
}
if ((prop = RNA_struct_find_property(op->ptr, "proportional_edit_falloff")) &&
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 16116036e86..edb144c0557 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -395,13 +395,15 @@ enum {
/* low level flag so exec() operators can tell if they were invoked, use with care.
* typically this shouldn't make any difference, but it rare cases its needed (see smooth-view) */
OP_IS_INVOKE = (1 << 0),
+ /* So we can detect if an operators exec() call is activated from an interactive repeat. */
+ OP_IS_REPEAT = (1 << 1),
/* When the cursor is grabbed */
- OP_IS_MODAL_GRAB_CURSOR = (1 << 1),
+ OP_IS_MODAL_GRAB_CURSOR = (1 << 2),
/* allow modal operators to have the region under the cursor for their context
* (the regiontype is maintained to prevent errors) */
- OP_IS_MODAL_CURSOR_REGION = (1 << 2),
+ OP_IS_MODAL_CURSOR_REGION = (1 << 3),
};
#endif /* __DNA_WINDOWMANAGER_TYPES_H__ */
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index ed56586711d..428f258c4c6 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -805,7 +805,9 @@ static int wm_operator_exec(bContext *C, wmOperator *op, const bool repeat, cons
if (op->type->flag & OPTYPE_UNDO)
wm->op_undo_depth++;
+ op->flag |= OP_IS_REPEAT;
retval = op->type->exec(C, op);
+ op->flag &= ~OP_IS_REPEAT;
OPERATOR_RETVAL_CHECK(retval);
if (op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)