Outliner; menu 'scene operations' didnt do anything, commented out

Undo; when using global undo, the editmode undo stack remains accessible.
Meaning you can do global undo/redo, and then go back in editmode and
have all undo/redo steps as originally left in editmode.
This commit is contained in:
2004-10-18 22:41:18 +00:00
parent 1a591506c6
commit 295f11ea70
2 changed files with 5 additions and 5 deletions

View File

@@ -99,7 +99,7 @@ void undo_editmode_menu(void) // history menu
#define MAXUNDONAME 64 #define MAXUNDONAME 64
typedef struct UndoElem { typedef struct UndoElem {
struct UndoElem *next, *prev; struct UndoElem *next, *prev;
Object *ob; ID id; // copy of editmode object ID
void *undodata; void *undodata;
char name[MAXUNDONAME]; char name[MAXUNDONAME];
void (*freedata)(void *); void (*freedata)(void *);
@@ -133,7 +133,7 @@ void undo_editmode_push(char *name, void (*freedata)(void *),
/* prevent two same undocalls */ /* prevent two same undocalls */
if(curundo && strcmp("Original", name)==0) { if(curundo && strcmp("Original", name)==0) {
if(curundo->ob==G.obedit) { if( strcmp(curundo->id.name, G.obedit->id.name)==0 ) {
return; return;
} }
} }
@@ -174,7 +174,7 @@ void undo_editmode_push(char *name, void (*freedata)(void *),
/* copy */ /* copy */
curundo->undodata= curundo->from_editmode(); curundo->undodata= curundo->from_editmode();
curundo->ob= G.obedit; curundo->id= G.obedit->id;
} }
@@ -187,7 +187,7 @@ static void undo_clean_stack(void)
uel= undobase.first; uel= undobase.first;
while(uel) { while(uel) {
next= uel->next; next= uel->next;
if(uel->ob!=G.obedit) { if(strcmp(curundo->id.name, G.obedit->id.name)!=0) {
mixed= 1; mixed= 1;
BLI_remlink(&undobase, uel); BLI_remlink(&undobase, uel);
uel->freedata(uel->undodata); uel->freedata(uel->undodata);

View File

@@ -1715,7 +1715,7 @@ void outliner_operation_menu(ScrArea *sa)
if(scenelevel) { if(scenelevel) {
if(objectlevel || datalevel || idlevel) error("Mixed selection"); if(objectlevel || datalevel || idlevel) error("Mixed selection");
else pupmenu("Scene Operations%t|Delete"); //else pupmenu("Scene Operations%t|Delete");
} }
else if(objectlevel) { else if(objectlevel) {
short event= pupmenu("Object Operations%t|Select%x1|Deselect%x2|Delete%x4"); short event= pupmenu("Object Operations%t|Select%x1|Deselect%x2|Delete%x4");