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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-13 20:24:17 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-13 20:26:52 +0300
commit711a50c5ea4de65be1512a1dbfa82b83ef993f56 (patch)
treec068e22657942f7a9cb8777e74a46ff54a111f5d /source/blender/editors/undo/ed_undo.c
parenta3c630aebb34e88de3a4820a0bb0f4359e13570d (diff)
parent4d58fac1b4ddcf424d78ee96b404445e8ccc6527 (diff)
Merge branch 'master' into blender2.8
This includes making Eevee match Cycles behavior of inserting an emission node when linking colors to closures.
Diffstat (limited to 'source/blender/editors/undo/ed_undo.c')
-rw-r--r--source/blender/editors/undo/ed_undo.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c
index d2ac346df10..6731a0d2e5b 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -148,15 +148,10 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
void ED_undo_grouped_push(bContext *C, const char *str)
{
/* do nothing if previous undo task is the same as this one (or from the same undo group) */
- {
- wmWindowManager *wm = CTX_wm_manager(C);
- if (wm->undo_stack->steps.last) {
- const UndoStep *us = wm->undo_stack->steps.last;
- if (STREQ(str, us->name)) {
- return;
- }
- }
-
+ wmWindowManager *wm = CTX_wm_manager(C);
+ const UndoStep *us = wm->undo_stack->step_active;
+ if (us && STREQ(str, us->name)) {
+ BKE_undosys_stack_clear_active(wm->undo_stack);
}
/* push as usual */