From 3fa2b85bfd672156f7019252d00f8859c1bd5b22 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 27 Nov 2019 11:06:49 +0100 Subject: 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 --- source/blender/editors/uvedit/uvedit_ops.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 0d258ba542b..eb3d47ba1b5 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -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); } -- cgit v1.2.3