From 95d6c014780a980ed9f1552edd4196ceefbce9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Mon, 23 Jun 2014 08:20:35 +0200 Subject: Fix T40756 Select Linked by Particle System matches ignores selected psys. This is inconsistent with other comparable cases like materials, where the active slot is used to define matching objects. --- source/blender/editors/object/object_select.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'source/blender/editors/object/object_select.c') diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index b1a78407491..a5a96c694f1 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -315,22 +315,20 @@ static bool object_select_all_by_dup_group(bContext *C, Object *ob) static bool object_select_all_by_particle(bContext *C, Object *ob) { + ParticleSystem *psys_act = psys_get_current(ob); bool changed = false; CTX_DATA_BEGIN (C, Base *, base, visible_bases) { if ((base->flag & SELECT) == 0) { - /* loop through other, then actives particles*/ + /* loop through other particles*/ ParticleSystem *psys; - ParticleSystem *psys_act; - + for (psys = base->object->particlesystem.first; psys; psys = psys->next) { - for (psys_act = ob->particlesystem.first; psys_act; psys_act = psys_act->next) { - if (psys->part == psys_act->part) { - base->flag |= SELECT; - changed = true; - break; - } + if (psys->part == psys_act->part) { + base->flag |= SELECT; + changed = true; + break; } if (base->flag & SELECT) { -- cgit v1.2.3