diff options
author | Germano <germano.costa@ig.com.br> | 2017-12-05 16:13:53 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2017-12-05 16:13:53 +0300 |
commit | 70c2d8a1a2b8b1e8c1f60f30451dbad88fba7188 (patch) | |
tree | 63a3e5ed8e0d1ee3882ecac3fde2e22701dae4d2 /source/blender/editors/mesh | |
parent | 4f2dd5ad260d4bc8d9feb38a868f17c46d7b6677 (diff) |
Fix T53469: Make sure that edges are drawn in the backbuff whenever you are looking for the nearest edge
Caused by rB9f5bf19
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 77a107534dd..1c620ad4681 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -634,9 +634,17 @@ BMEdge *EDBM_edge_find_nearest_ex( unsigned int index; BMEdge *eed; + /* Make sure that the edges are 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; + index = ED_view3d_backbuf_sample_rect(vc, vc->mval, dist_px, bm_solidoffs, bm_wireoffs, &dist_test); eed = index ? BM_edge_at_index_find_or_table(bm, index - 1) : NULL; |