BMesh: only remove loose geometry when joining faces

Joining faces could remove faces that happened to share an edge that would normally be removed.
This commit is contained in:
Campbell Barton 2016-05-11 01:14:46 +10:00
parent 98123ae916
commit e525a06800

@ -1399,11 +1399,15 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del)
/* delete old geometry */
if (do_del) {
for (i = 0; i < BLI_array_count(deledges); i++) {
BM_edge_kill(bm, deledges[i]);
if (deledges[i]->l == NULL) {
BM_edge_kill(bm, deledges[i]);
}
}
for (i = 0; i < BLI_array_count(delverts); i++) {
BM_vert_kill(bm, delverts[i]);
if (delverts[i]->e == NULL) {
BM_vert_kill(bm, delverts[i]);
}
}
}
else {