diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-12 16:49:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-12 16:49:54 +0400 |
commit | 6e98c791af2b17f61c6e7d18dcbf561ab3239a41 (patch) | |
tree | 717acf210d875f977fcaf2e14f9c43cdc85cf01c /source/blender/editors/mesh/editmesh_mods.c | |
parent | ba03e5023ebd2d1d5db4d57a0046ce58f699d334 (diff) |
fix [#26885] transform option disapears when deselecting loops
deselecting edgeloop & edgering would leave the verts de-selected even if other edges had them selected.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_mods.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_mods.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 375ec474382..bc8c50386ce 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -1827,6 +1827,20 @@ static int edge_not_in_tagged_face(EditMesh *em, EditEdge *eed) return 1; } +static void ensure_ed_vert_sel(EditMesh *em) +{ + EditEdge *eed; + + /* EM_selectmode_flush() doesnt take into account that deselected edges + * may be still connected to selected edges [#26885] */ + for(eed= em->edges.first; eed; eed= eed->next) { + if(eed->f & SELECT) { + eed->v1->f |= SELECT; + eed->v2->f |= SELECT; + } + } +} + /* selects or deselects edges that: - if edges has 2 faces: - has vertices with valence of 4 @@ -1899,6 +1913,10 @@ static void edgeloop_select(EditMesh *em, EditEdge *starteed, int select) for(eed= em->edges.first; eed; eed= eed->next) { if(eed->f2) EM_select_edge(eed, select); } + + if(select == FALSE) { + ensure_ed_vert_sel(em); + } } /* @@ -1968,6 +1986,10 @@ static void edgering_select(EditMesh *em, EditEdge *startedge, int select) for(eed= em->edges.first; eed; eed= eed->next) { if(eed->f2) EM_select_edge(eed, select); } + + if(select == FALSE) { + ensure_ed_vert_sel(em); + } } static int loop_multiselect(bContext *C, wmOperator *op) |