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>2012-02-23 19:47:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-23 19:47:18 +0400
commitc6f340e6b050775cec512c1e8eef6e10af4cf996 (patch)
tree37afef915a4ba49a93087d09e1840328bf239732 /source/blender/bmesh/intern/bmesh_operators.c
parent668297c8b8cb874163c837b1c3ecb1068896b3d2 (diff)
previous fix wasnt working in edge mode, now selection +/- works in vert/edge/face modes.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_operators.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c
index edfea460f1a..f26dd7bbe6f 100644
--- a/source/blender/bmesh/intern/bmesh_operators.c
+++ b/source/blender/bmesh/intern/bmesh_operators.c
@@ -765,7 +765,7 @@ void BMO_slot_from_flag(BMesh *bm, BMOperator *op, const char *slotname,
* using the selection API where appropriate.
*/
void BMO_slot_buffer_hflag_enable(BMesh *bm, BMOperator *op, const char *slotname,
- const char hflag, const char htype)
+ const char hflag, const char htype, char do_flush_select)
{
BMOpSlot *slot = BMO_slot_get(op, slotname);
BMHeader **data = slot->data.p;
@@ -773,11 +773,15 @@ void BMO_slot_buffer_hflag_enable(BMesh *bm, BMOperator *op, const char *slotnam
BLI_assert(slot->slottype > BMO_OP_SLOT_VEC);
+ if (!(hflag & BM_ELEM_SELECT)) {
+ do_flush_select = FALSE;
+ }
+
for (i = 0; i < slot->len; i++) {
if (!(htype & data[i]->htype))
continue;
- if (hflag & BM_ELEM_SELECT) {
+ if (do_flush_select) {
BM_elem_select_set(bm, data[i], TRUE);
}
BM_elem_flag_enable(data[i], hflag);
@@ -792,19 +796,23 @@ void BMO_slot_buffer_hflag_enable(BMesh *bm, BMOperator *op, const char *slotnam
* using the selection API where appropriate.
*/
void BMO_slot_buffer_hflag_disable(BMesh *bm, BMOperator *op, const char *slotname,
- const char hflag, const char htype)
+ const char hflag, const char htype, char do_flush_select)
{
BMOpSlot *slot = BMO_slot_get(op, slotname);
BMHeader **data = slot->data.p;
int i;
BLI_assert(slot->slottype > BMO_OP_SLOT_VEC);
-
+
+ if (!(hflag & BM_ELEM_SELECT)) {
+ do_flush_select = FALSE;
+ }
+
for (i = 0; i < slot->len; i++) {
if (!(htype & data[i]->htype))
continue;
- if (hflag & BM_ELEM_SELECT) {
+ if (do_flush_select) {
BM_elem_select_set(bm, data[i], FALSE);
}