skip recalculating tessface when adding objects if 'EnterEdit-mode' is disabled.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 29 Nov 2012 02:37:39 +0000 (02:37 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 29 Nov 2012 02:37:39 +0000 (02:37 +0000)
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/object/object_add.c

index 23f7c3073562ee718a1ef38d0f890e28677083fa..cd6063b12d0d1b18f9fe6ca3db13c1dd06377804 100644 (file)
@@ -86,7 +86,8 @@ static void make_prim_finish(bContext *C, Object *obedit, int *state, int enter_
         * to push this up to edges & faces. */
        EDBM_selectmode_flush_ex(em, SCE_SELECT_VERTEX);
 
-       EDBM_update_generic(C, em, TRUE);
+       /* only recalc editmode tessface if we are staying in editmode */
+       EDBM_update_generic(C, em, enter_editmode);
 
        /* userdef */
        if (*state && !enter_editmode) {
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);
                }
        }