From 4df5b943edeb7bb65a5b19c6130e1959966c2878 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 22 Feb 2013 14:12:55 +0000 Subject: patch [#34103] - listbase.patch, insertlinkbefore.patch from Lawrence D'Oliveiro (ldo) notes from tracker: use bool for return type from BLI_remlink_safe, necessitating including BLI_utildefines.h in BLI_listbase.h get rid of duplicate BLI_insertlink, use BLI_insertlinkafter instead. A few places which were using BLI_insertlinkafter (actually BLI_insertlink), when it would be simpler to use BLI_insertlinkbefore instead. --- source/blender/editors/physics/particle_object.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/physics/particle_object.c') diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 8cae0140b5a..5fd2a0806e9 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -310,7 +310,7 @@ static int target_move_up_exec(bContext *C, wmOperator *UNUSED(op)) for (; pt; pt=pt->next) { if (pt->flag & PTARGET_CURRENT && pt->prev) { BLI_remlink(&psys->targets, pt); - BLI_insertlink(&psys->targets, pt->prev->prev, pt); + BLI_insertlinkbefore(&psys->targets, pt->prev, pt); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); @@ -348,7 +348,7 @@ static int target_move_down_exec(bContext *C, wmOperator *UNUSED(op)) for (; pt; pt=pt->next) { if (pt->flag & PTARGET_CURRENT && pt->next) { BLI_remlink(&psys->targets, pt); - BLI_insertlink(&psys->targets, pt->next, pt); + BLI_insertlinkafter(&psys->targets, pt->next, pt); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); @@ -387,7 +387,7 @@ static int dupliob_move_up_exec(bContext *C, wmOperator *UNUSED(op)) for (dw=part->dupliweights.first; dw; dw=dw->next) { if (dw->flag & PART_DUPLIW_CURRENT && dw->prev) { BLI_remlink(&part->dupliweights, dw); - BLI_insertlink(&part->dupliweights, dw->prev->prev, dw); + BLI_insertlinkbefore(&part->dupliweights, dw->prev, dw); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL); break; @@ -509,7 +509,7 @@ static int dupliob_move_down_exec(bContext *C, wmOperator *UNUSED(op)) for (dw=part->dupliweights.first; dw; dw=dw->next) { if (dw->flag & PART_DUPLIW_CURRENT && dw->next) { BLI_remlink(&part->dupliweights, dw); - BLI_insertlink(&part->dupliweights, dw->next, dw); + BLI_insertlinkafter(&part->dupliweights, dw->next, dw); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL); break; -- cgit v1.2.3