Fix T40080: forcefield_toggle_exec() doesn't always enable force field.

Kudos to Brent Baccala for investigating and suggesting a fix.
This commit is contained in:
Lukas Tönne 2014-05-08 08:11:53 +02:00
parent 49cde5d8c1
commit cd60c18be1

@ -1127,8 +1127,7 @@ static int forcefield_toggle_exec(bContext *C, wmOperator *UNUSED(op))
if (ob->pd == NULL)
ob->pd = object_add_collision_fields(PFIELD_FORCE);
if (ob->pd->forcefield == 0)
else if (ob->pd->forcefield == 0)
ob->pd->forcefield = PFIELD_FORCE;
else
ob->pd->forcefield = 0;