Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-24 09:24:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-24 09:24:27 +0400
commit69d1e8187c8519132fa484df40f63d7146716680 (patch)
tree050ba8d8fd8c18b00ffb2bb5819eba4dfc217095 /source/blender/editors/mesh/editmesh_path.c
parent781184562b47846113a83549fe0ef5d36a957579 (diff)
make behavior for edge tagging more predictable.
last-picked edge is always selected+active.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_path.c')
-rw-r--r--source/blender/editors/mesh/editmesh_path.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/editmesh_path.c b/source/blender/editors/mesh/editmesh_path.c
index f4fd5a89277..828afe7718b 100644
--- a/source/blender/editors/mesh/editmesh_path.c
+++ b/source/blender/editors/mesh/editmesh_path.c
@@ -255,6 +255,7 @@ static bool mouse_mesh_shortest_path_edge(ViewContext *vc)
e_dst = EDBM_edge_find_nearest(vc, &dist);
if (e_dst) {
+ const char edge_mode = vc->scene->toolsettings->edge_mode;
struct UserData user_data = {bm, vc->obedit->data, vc->scene};
LinkNode *path = NULL;
Mesh *me = vc->obedit->data;
@@ -296,16 +297,26 @@ static bool mouse_mesh_shortest_path_edge(ViewContext *vc)
edgetag_set_cb(e_dst, is_act, &user_data); /* switch the edge option */
}
+ if (edge_mode != EDGE_MODE_SELECT) {
+ /* simple rules - last edge is _always_ active and selected */
+ if (e_act)
+ BM_edge_select_set(bm, e_act, false);
+ BM_edge_select_set(bm, e_dst, true);
+ BM_select_history_store(bm, e_dst);
+ }
+
EDBM_selectmode_flush(em);
/* even if this is selected it may not be in the selection list */
- if (edgetag_test_cb(e_dst, &user_data) == 0)
- BM_select_history_remove(bm, e_dst);
- else
- BM_select_history_store(bm, e_dst);
+ if (edge_mode == EDGE_MODE_SELECT) {
+ if (edgetag_test_cb(e_dst, &user_data) == 0)
+ BM_select_history_remove(bm, e_dst);
+ else
+ BM_select_history_store(bm, e_dst);
+ }
/* force drawmode for mesh */
- switch (vc->scene->toolsettings->edge_mode) {
+ switch (edge_mode) {
case EDGE_MODE_TAG_SEAM:
me->drawflag |= ME_DRAWSEAMS;