From 974ec7ddcf1bc6a59d0192c84567cc0e03df1074 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 10 Jul 2013 05:01:49 +0000 Subject: fix for particle lasso-select inverting the selection. --- source/blender/editors/physics/particle_edit.c | 32 ++++++++++++++++---------- 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'source/blender/editors/physics') diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 179195eb344..d6bb394ff79 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1722,13 +1722,17 @@ int PE_lasso_select(bContext *C, const int mcords[][2], const short moves, bool BLI_lasso_is_point_inside(mcords, moves, screen_co[0], screen_co[1], IS_CLIPPED) && key_test_depth(&data, co, screen_co)) { - if (select && !(key->flag & PEK_SELECT)) { - key->flag |= PEK_SELECT; - point->flag |= PEP_EDIT_RECALC; + if (select) { + if (!(key->flag & PEK_SELECT)) { + key->flag |= PEK_SELECT; + point->flag |= PEP_EDIT_RECALC; + } } - else if (key->flag & PEK_SELECT) { - key->flag &= ~PEK_SELECT; - point->flag |= PEP_EDIT_RECALC; + else { + if (key->flag & PEK_SELECT) { + key->flag &= ~PEK_SELECT; + point->flag |= PEP_EDIT_RECALC; + } } } } @@ -1742,13 +1746,17 @@ int PE_lasso_select(bContext *C, const int mcords[][2], const short moves, bool BLI_lasso_is_point_inside(mcords, moves, screen_co[0], screen_co[1], IS_CLIPPED) && key_test_depth(&data, co, screen_co)) { - if (select && !(key->flag & PEK_SELECT)) { - key->flag |= PEK_SELECT; - point->flag |= PEP_EDIT_RECALC; + if (select) { + if (!(key->flag & PEK_SELECT)) { + key->flag |= PEK_SELECT; + point->flag |= PEP_EDIT_RECALC; + } } - else if (key->flag & PEK_SELECT) { - key->flag &= ~PEK_SELECT; - point->flag |= PEP_EDIT_RECALC; + else { + if (key->flag & PEK_SELECT) { + key->flag &= ~PEK_SELECT; + point->flag |= PEP_EDIT_RECALC; + } } } } -- cgit v1.2.3