[#28681] Switching transform type doesn't register correct operator for 'repeat'.
authorMartin Poirier <theeth@yahoo.com>
Tue, 27 Sep 2011 01:28:15 +0000 (01:28 +0000)
committerMartin Poirier <theeth@yahoo.com>
Tue, 27 Sep 2011 01:28:15 +0000 (01:28 +0000)
Reported by Nicholas Rishel

Part of a potential fix, see discussion in tracker.

source/blender/editors/transform/transform.c

index fbe0a18..c77f762 100644 (file)
@@ -1358,6 +1358,11 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
        int proportional = 0;
        PropertyRNA *prop;
 
+       // Save back mode in case we're in the generic operator
+       if ((prop= RNA_struct_find_property(op->ptr, "mode"))) {
+               RNA_property_enum_set(op->ptr, prop, t->mode);
+       }
+
        if ((prop= RNA_struct_find_property(op->ptr, "value"))) {
                float *values= (t->flag & T_AUTOVALUES) ? t->auto_values : t->values;
                if (RNA_property_array_check(prop)) {