forked from bartvdbraak/blender
Bugfix #3507
Global Undo didn't use the 'undo steps' value in the user presets yet... even whilst button mentioned 'editmode undo' there, an easy fix to add.
This commit is contained in:
parent
bf05bbef86
commit
4fb1bcaa15
@ -495,7 +495,6 @@ typedef struct UndoElem {
|
||||
MemFile memfile;
|
||||
} UndoElem;
|
||||
|
||||
#define MAXUNDO 32
|
||||
static ListBase undobase={NULL, NULL};
|
||||
static UndoElem *curundo= NULL;
|
||||
|
||||
@ -547,7 +546,7 @@ void BKE_write_undo(char *name)
|
||||
uel= undobase.last;
|
||||
while(uel) {
|
||||
nr++;
|
||||
if(nr==MAXUNDO) break;
|
||||
if(nr==U.undosteps) break;
|
||||
uel= uel->prev;
|
||||
}
|
||||
if(uel) {
|
||||
@ -569,7 +568,7 @@ void BKE_write_undo(char *name)
|
||||
|
||||
/* calculate current filename */
|
||||
counter++;
|
||||
counter= counter % MAXUNDO;
|
||||
counter= counter % U.undosteps;
|
||||
|
||||
sprintf(numstr, "%d.blend", counter);
|
||||
BLI_make_file_string("/", tstr, U.tempdir, numstr);
|
||||
|
@ -2657,17 +2657,17 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
||||
uiBlockEndAlign(block);
|
||||
|
||||
|
||||
uiDefBut(block, LABEL,0,"Editmode undo:",
|
||||
uiDefBut(block, LABEL,0,"Undo:",
|
||||
(xpos+(2*edgsp)+mpref),y3label, mpref,buth,
|
||||
0, 0, 0, 0, 0, "");
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefButS(block, NUMSLI, B_DRAWINFO, "Steps:",
|
||||
(xpos+edgsp+mpref+midsp),y2,mpref,buth,
|
||||
&(U.undosteps), 0, 64, 0, 0, "Number of undo steps available in Edit Mode (smaller values conserve memory)");
|
||||
&(U.undosteps), 0, 64, 0, 0, "Number of undo steps available (smaller values conserve memory)");
|
||||
|
||||
uiDefButBitI(block, TOG, USER_GLOBALUNDO, B_DRAWINFO, "Global undo",
|
||||
(xpos+edgsp+mpref+midsp),y1,mpref,buth,
|
||||
&(U.uiflag), 2, 64, 0, 0, "");
|
||||
&(U.uiflag), 2, 64, 0, 0, "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory");
|
||||
uiBlockEndAlign(block);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user