Fix #162004: UV Selection Sync mismatch in face selection mode

If every neighbor of a face is selected, that face's entire
boundary is tagged even though the face itself was never selected.
Before the boundary was used to determine face selection,
but this should not be used in face mode.

When in face select mode use the faces own UV selection flag to
avoid incorrectly selecting a face that is surrounded by selected faces,
but not selected itself.

Ref !162011
This commit is contained in:
Eitan Traurig 2026-07-28 14:02:58 +10:00 • committed by Campbell Barton
parent 9b68c5aec8
commit dd719372ae

View file

@ -1920,19 +1920,7 @@ void BM_mesh_uvselect_sync_to_mesh(BMesh *bm)
if (BM_elem_flag_test(f, BM_ELEM_HIDDEN)) {
continue;
}
BMLoop *l_iter, *l_first;
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
bool face_select = true;
do {
if (!BM_elem_flag_test(l_iter, BM_ELEM_SELECT_UV) ||
!BM_elem_flag_test(l_iter, BM_ELEM_SELECT_UV_EDGE))
{
face_select = false;
break;
}
} while ((l_iter = l_iter->next) != l_first);
if (face_select) {
if (BM_elem_flag_test(f, BM_ELEM_SELECT_UV)) {
BM_face_select_set(bm, f, true);
}
}