Fix (unreported) missing viewport update deleting a particle
authorPhilipp Oeser <info@graphics-engineer.com>
Wed, 18 Sep 2019 13:19:15 +0000 (15:19 +0200)
committerPhilipp Oeser <info@graphics-engineer.com>
Wed, 18 Sep 2019 15:19:33 +0000 (17:19 +0200)
If children hairs were displayed in particle editmode, these would not
update when a particle was deleted.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D5840

source/blender/editors/physics/particle_edit.c

index 2047ecb9e0a38da8dd9277569ed335f19f066476..59973d9ee8a1d5d5cbb5037dd63d8eedb654ee0b 100644 (file)
@@ -3315,6 +3315,7 @@ static int delete_exec(bContext *C, wmOperator *op)
   }
 
   DEG_id_tag_update(&data.ob->id, ID_RECALC_GEOMETRY);
+  BKE_particle_batch_cache_dirty_tag(data.edit->psys, BKE_PARTICLE_BATCH_DIRTY_ALL);
   WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, data.ob);
 
   return OPERATOR_FINISHED;