diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-21 16:14:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-21 16:14:07 +0400 |
commit | 96b024333edf31fb02881b1c2fbacaf556a49439 (patch) | |
tree | 6afcb426213979c4963215f1d91abcf40da20ec9 /source/blender/editors/mesh/editmesh_select.c | |
parent | f910abaddaec82dde3bd27ae3fa720b37f2359fc (diff) |
fix [#31047] ctrl+mouse select in edit-mode does not select external object
fix [#30535] Shortest Path Select not working well in vertex mode.
regression from after bmesh merge, Ctrl+Right mouse for selecting shortest path is meant for edge mode only.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_select.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index b6e162cb220..12fa5f66a69 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1415,7 +1415,17 @@ static int edbm_shortest_path_select_invoke(bContext *C, wmOperator *UNUSED(op), return OPERATOR_FINISHED; } - + +static int edbm_shortest_path_select_poll(bContext *C) +{ + if(ED_operator_editmesh_region_view3d(C)) { + Object *obedit = CTX_data_edit_object(C); + BMEditMesh *em = BMEdit_FromObject(obedit); + return (em->selectmode & SCE_SELECT_EDGE) != 0; + } + return 0; +} + void MESH_OT_select_shortest_path(wmOperatorType *ot) { /* identifiers */ @@ -1425,7 +1435,7 @@ void MESH_OT_select_shortest_path(wmOperatorType *ot) /* api callbacks */ ot->invoke = edbm_shortest_path_select_invoke; - ot->poll = ED_operator_editmesh; + ot->poll = edbm_shortest_path_select_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; |