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:
authorCampbell Barton <ideasman42@gmail.com>2018-04-03 09:35:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-03 09:35:42 +0300
commita0eb54142f244641041b0cb317cd09171105ad72 (patch)
treebf730ea540d2b44ffdb9c29cb4d379eb295737ee /source/blender/editors/physics
parent31f2a6755db5bf9439e51701eddcadfca773459a (diff)
Undo: replace global access w/ ED_undo_stack_get
While I'd like to avoid using this too much since the operator system should handle. It's less trouble than accessing it inline each time.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/particle_edit_undo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/physics/particle_edit_undo.c b/source/blender/editors/physics/particle_edit_undo.c
index 329658a56e1..6e212174f39 100644
--- a/source/blender/editors/physics/particle_edit_undo.c
+++ b/source/blender/editors/physics/particle_edit_undo.c
@@ -45,16 +45,15 @@
#include "BLI_utildefines.h"
#include "BKE_depsgraph.h"
-#include "BKE_global.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_context.h"
-#include "BKE_main.h"
#include "BKE_undo_system.h"
#include "ED_object.h"
#include "ED_particle.h"
#include "ED_physics.h"
+#include "ED_undo.h"
#include "particle_edit_utildefines.h"
@@ -304,10 +303,10 @@ void ED_particle_undosys_type(UndoType *ut)
void PE_undo_push(struct Scene *scene, const char *str)
{
- wmWindowManager *wm = G.main->wm.first;
+ UndoStack *ustack = ED_undo_stack_get();
bContext *C_temp = CTX_create();
CTX_data_scene_set(C_temp, scene);
- BKE_undosys_step_push_with_type(wm->undo_stack, C_temp, str, BKE_UNDOSYS_TYPE_PARTICLE);
+ BKE_undosys_step_push_with_type(ustack, C_temp, str, BKE_UNDOSYS_TYPE_PARTICLE);
CTX_free(C_temp);
}