Fix T71864: Broken 'Select' > 'More' in face mode in UV Editor

Caused by rBeead6a604602.

Above commit didnt account for different element types being tagged (face
select mode tagged faces, others tagged loops) and always flushed from
loops.

Now restore to flush from faces if we are in face select mode.

Maniphest Tasks: T71864

Differential Revision: https://developer.blender.org/D6315
This commit is contained in:
Philipp Oeser 2019-11-27 11:06:49 +01:00 committed by Sergey Sharybin
parent 60e817693c
commit bdfcee347e
Notes: blender-bot 2023-02-14 03:44:41 +01:00
Referenced by issue #71864, Broken "Select" -> "More" in face mode in UV Editor
1 changed files with 11 additions and 3 deletions

View File

@ -1478,6 +1478,8 @@ static int uv_select_more_less(bContext *C, const bool select)
Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(
view_layer, ((View3D *)NULL), &objects_len);
const bool is_uv_face_selectmode = (ts->uv_selectmode == UV_SELECT_FACE);
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
Object *obedit = objects[ob_index];
BMEditMesh *em = BKE_editmesh_from_object(obedit);
@ -1499,7 +1501,7 @@ static int uv_select_more_less(bContext *C, const bool select)
continue;
}
if (ts->uv_selectmode == UV_SELECT_FACE) {
if (is_uv_face_selectmode) {
/* clear tags */
BM_mesh_elem_hflag_disable_all(em->bm, BM_FACE, BM_ELEM_TAG, false);
@ -1562,8 +1564,14 @@ static int uv_select_more_less(bContext *C, const bool select)
}
if (changed) {
/* Select tagged loops. */
uv_select_flush_from_tag_loop(sima, scene, obedit, select);
if (is_uv_face_selectmode) {
/* Select tagged faces. */
uv_select_flush_from_tag_face(sima, scene, obedit, select);
}
else {
/* Select tagged loops. */
uv_select_flush_from_tag_loop(sima, scene, obedit, select);
}
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
}