diff options
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 73885ab2a78..4a639e227f7 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1879,10 +1879,16 @@ bool PE_mouse_particles(bContext *C, const int mval[2], const struct SelectPick_ PTCacheEditKey *key; bool changed = false; - const bool found = pe_nearest_point_and_key(C, mval, &point, &key); + bool found = pe_nearest_point_and_key(C, mval, &point, &key); - if ((params->sel_op == SEL_OP_SET) && (found || params->deselect_all)) { - changed |= PE_deselect_all_visible_ex(edit); + if (params->sel_op == SEL_OP_SET) { + if ((found && params->select_passthrough) && (key->flag & PEK_SELECT)) { + found = false; + } + else if (found || params->deselect_all) { + /* Deselect everything. */ + changed |= PE_deselect_all_visible_ex(edit); + } } if (found) { |