diff options
-rw-r--r-- | source/blender/bmesh/operators/bmo_removedoubles.c | 15 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c index 42373ad0ef0..5d9852d1c68 100644 --- a/source/blender/bmesh/operators/bmo_removedoubles.c +++ b/source/blender/bmesh/operators/bmo_removedoubles.c @@ -126,6 +126,21 @@ static void remdoubles_createface(BMesh *bm, BMFace *f, BMOpSlot *slot_targetmap continue; } + /* low level selection, not essential but means we can keep + * edge selection valid on auto-merge for example. */ + if ((BM_elem_flag_test(l->e, BM_ELEM_SELECT) == true) && + (BM_elem_flag_test(e_new, BM_ELEM_SELECT) == false)) + { + BM_elem_flag_disable(l->e, BM_ELEM_SELECT); + BM_elem_flag_merge_into(e_new, e_new, l->e); + BM_elem_flag_enable(e_new, BM_ELEM_SELECT); + /* bm->totedgesel remains valid */ + } + else { + BM_elem_flag_merge_into(e_new, e_new, l->e); + } + + STACK_PUSH(edges, e_new); STACK_PUSH(loops, l); } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 924995e7b92..16642dec5b0 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5942,6 +5942,10 @@ static void special_aftertrans_update__mesh(bContext *UNUSED(C), TransInfo *t) } EDBM_automerge(t->scene, t->obedit, true, hflag); + + if ((em->selectmode & SCE_SELECT_VERTEX) == 0) { + EDBM_select_flush(em); + } } } |