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@pandora.be>2010-01-26 18:54:42 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-26 18:54:42 +0300
commit8d6a40c0162fba7d64b349bb5e7370c860acbb35 (patch)
tree1fbb049d403b0271c694339cda5f30795f0e3be9 /source/blender/editors/util/editmode_undo.c
parentdcf54b9b669015b527579844fdb19a053b04c96e (diff)
Fix #19802: tweaking the values of e.g. the add tube operator when
entering editmode on a second mesh would create a duplicate tube. Cleaning the undo stack from the previous mesh would mess up the redo. Also, OBJECT_OT_mode_set was causing enter/exit editmode undo push to be done twice, now it leaves undo push to the operator it calls.
Diffstat (limited to 'source/blender/editors/util/editmode_undo.c')
-rw-r--r--source/blender/editors/util/editmode_undo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index 5fb93b0f8ec..a21ff088f2e 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -203,7 +203,6 @@ static void undo_clean_stack(bContext *C)
{
UndoElem *uel, *next;
Object *obedit= CTX_data_edit_object(C);
- int mixed= 0;
/* global undo changes pointers, so we also allow identical names */
/* side effect: when deleting/renaming object and start editing new one with same name */
@@ -226,7 +225,9 @@ static void undo_clean_stack(bContext *C)
if(isvalid)
uel->ob= obedit;
else {
- mixed= 1;
+ if(uel == curundo)
+ curundo= NULL;
+
uel->freedata(uel->undodata);
BLI_freelinkN(&undobase, uel);
}
@@ -234,7 +235,7 @@ static void undo_clean_stack(bContext *C)
uel= next;
}
- if(mixed) curundo= undobase.last;
+ if(curundo == NULL) curundo= undobase.last;
}
/* 1= an undo, -1 is a redo. we have to make sure 'curundo' remains at current situation */