diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-16 10:01:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-16 10:01:00 +0300 |
commit | a9481479776aa7c1998382a0cc52113fc4706c0c (patch) | |
tree | 0a28ae49316989ae40c11ee0f60336b03b873b12 /source/blender/editors/physics | |
parent | edc1b0167518a7c5b73b948fcb3a74da20343fb5 (diff) |
Fix T63646: Box/Lasso select fails to de-select
Select 'New' wasn't de-selecting when there was nothing selected
in some cases.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 149dadedfb4..dcd8f7a93da 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -38,6 +38,7 @@ #include "BLI_math.h" #include "BLI_lasso_2d.h" #include "BLI_listbase.h" +#include "BLI_rect.h" #include "BLI_kdtree.h" #include "BLI_rand.h" #include "BLI_task.h" @@ -2066,7 +2067,14 @@ bool PE_box_select(bContext *C, const rcti *rect, const int sel_op) if (SEL_OP_USE_PRE_DESELECT(sel_op)) { data.is_changed = PE_deselect_all_visible_ex(edit); } - for_mouse_hit_keys(&data, select_key_op, PSEL_ALL_KEYS); + + if (BLI_rcti_is_empty(rect)) { + /* pass */ + } + else { + for_mouse_hit_keys(&data, select_key_op, PSEL_ALL_KEYS); + } + if (data.is_changed) { PE_update_selection(data.depsgraph, scene, ob, 1); WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_SELECTED, ob); |