diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-24 20:30:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-24 20:31:07 +0300 |
commit | d209fa6e35a26dde216a0527f3d73d75c328a9a0 (patch) | |
tree | c99cf35d35ee75a421908848a9b3c34a56481b95 /source/blender/editors/mesh | |
parent | 0983d97ab92cb77c75e9ed700379efaa209b52b7 (diff) |
Fix T55184: Edge-loop select fails w/ vert/face modes
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 11f87b3710d..f056a0a97c1 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1706,15 +1706,23 @@ static bool mouse_mesh_loop(bContext *C, const int mval[2], bool extend, bool de /* Make sure that the edges are also considered for selection. * TODO: cleanup: add `selectmode` as a parameter */ const short ts_selectmode = vc.scene->toolsettings->selectmode; - vc.scene->toolsettings->selectmode |= SCE_SELECT_EDGE; - - /* no afterqueue (yet), so we check it now, otherwise the bm_xxxofs indices are bad */ - ED_view3d_backbuf_validate(&vc); - - /* restore `selectmode` */ - vc.scene->toolsettings->selectmode = ts_selectmode; + bool use_fake_edge_mode = false; + if (ts_selectmode & SCE_SELECT_EDGE) { + vc.v3d->flag |= V3D_INVALID_BACKBUF; + vc.scene->toolsettings->selectmode |= SCE_SELECT_EDGE; + em->selectmode = vc.scene->toolsettings->selectmode; + use_fake_edge_mode = true; + } eed = EDBM_edge_find_nearest_ex(&vc, &dist, NULL, true, true, NULL); + + /* restore `selectmode` */ + if (use_fake_edge_mode) { + vc.v3d->flag |= V3D_INVALID_BACKBUF; + vc.scene->toolsettings->selectmode = ts_selectmode; + em->selectmode = ts_selectmode; + } + if (eed == NULL) { return false; } |