Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2009-11-08 02:10:18 +0300
committerJoseph Eagar <joeedh@gmail.com>2009-11-08 02:10:18 +0300
commit2ead17843c08c9c4ed211010c0ad4d2a5c31a99c (patch)
tree0fc77499284278cdf8b017eac803910c87b4e07a /source/blender/editors/physics/particle_object.c
parentcfa4f3222a427eff1991e8fd2c341ce4ca5385bd (diff)
parent4e9699debff6b0ac7e3bfc91d615e071218a67db (diff)
merge with trunk/2.5 at r24378
Diffstat (limited to 'source/blender/editors/physics/particle_object.c')
-rw-r--r--source/blender/editors/physics/particle_object.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index bd94f7ff5bb..0c24e3fff0a 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -93,11 +93,20 @@ static int particle_system_remove_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
Scene *scene = CTX_data_scene(C);
-
+ int mode_orig = ob->mode;
if(!scene || !ob)
return OPERATOR_CANCELLED;
object_remove_particle_system(scene, ob);
+
+ /* possible this isn't the active object
+ * object_remove_particle_system() clears the mode on the last psys
+ * */
+ if(mode_orig & OB_MODE_PARTICLE_EDIT)
+ if((ob->mode & OB_MODE_PARTICLE_EDIT)==0)
+ if(scene->basact && scene->basact->object==ob)
+ WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
+
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return OPERATOR_FINISHED;