diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-28 08:27:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-28 12:04:21 +0300 |
commit | 9e9cb9fce9c74d32b4f7fad9fdbcbbc59acc53b9 (patch) | |
tree | 2b31b3db0c7d89558cfe14b6a924ff2e0f1f5c1e /source/blender/editors/physics | |
parent | c0d6627dc5fd069ec31c116e98e1817a0fe20ebb (diff) |
Workspace: sync object-modes to other workspaces
When changing the mode of an object, apply this to all other
workspaces that share the same active object.
Also use copy the object-mode when duplicating workspaces.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 376e4659b92..850ef0ad958 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -72,6 +72,7 @@ #include "ED_physics.h" #include "ED_mesh.h" #include "ED_particle.h" +#include "ED_screen.h" #include "ED_view3d.h" #include "GPU_immediate.h" @@ -4786,6 +4787,7 @@ static int particle_edit_toggle_poll(bContext *C) static int particle_edit_toggle_exec(bContext *C, wmOperator *op) { + wmWindowManager *wm = CTX_wm_manager(C); struct WorkSpace *workspace = CTX_wm_workspace(C); EvaluationContext eval_ctx; CTX_data_eval_ctx(C, &eval_ctx); @@ -4820,6 +4822,8 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL); } + ED_workspace_object_mode_sync_from_object(wm, workspace, ob); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); return OPERATOR_FINISHED; |