skip recalculating tessface when adding objects if 'EnterEdit-mode' is disabled.
[blender.git] / source / blender / editors / object / object_add.c
index 4d1f2bbc4e93ee1d7f1711d9ee5a4e84e4e1edc6..ad1e2816c10097f762f19b3c0922527faf8d5632 100644 (file)
@@ -271,7 +271,7 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float loc[3], fl
                if (RNA_struct_property_is_set(op->ptr, "enter_editmode") && enter_editmode)
                        *enter_editmode = RNA_boolean_get(op->ptr, "enter_editmode");
                else {
-                       *enter_editmode = U.flag & USER_ADD_EDITMODE;
+                       *enter_editmode = (U.flag & USER_ADD_EDITMODE) != 0;
                        RNA_boolean_set(op->ptr, "enter_editmode", *enter_editmode);
                }
        }