diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2019-11-27 13:06:49 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-11-27 14:01:12 +0300 |
commit | 3fa2b85bfd672156f7019252d00f8859c1bd5b22 (patch) | |
tree | b7f4fb9afa8e0d3aef06c801540a1eb39fe9db63 /source | |
parent | 50128e8e79bff560d0da6825663543c82286ab17 (diff) |
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
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 14 |
1 files changed, 11 insertions, 3 deletions
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); } |