Fix for #1706 (Wavk again!)

- Undo in texteditor didnt work, event (ALT+U) was swallowed by new undo
  menu (ALT+U too)
- global undo doesnt restore UI's as we know... so undo-ing with a text
  editor active cannot always restore correct text block you were editing.
  As extra service I added that when no restore is possible, it links to
  the first block available.
This commit is contained in:
Ton Roosendaal 2004-10-29 15:00:11 +00:00
parent f33f2abe39
commit 63d81be035
2 changed files with 5 additions and 2 deletions

@ -2753,6 +2753,7 @@ void lib_link_screen_restore(Main *newmain, char mode, Scene *curscene)
SpaceText *st= (SpaceText *)sl; SpaceText *st= (SpaceText *)sl;
st->text= restore_pointer_by_name(newmain, (ID *)st->text); st->text= restore_pointer_by_name(newmain, (ID *)st->text);
if(st->text==NULL) st->text= newmain->text.first;
} }
else if(sl->spacetype==SPACE_SCRIPT) { else if(sl->spacetype==SPACE_SCRIPT) {
SpaceScript *sc= (SpaceScript *)sl; SpaceScript *sc= (SpaceScript *)sl;

@ -950,10 +950,12 @@ int blenderqread(unsigned short event, short val)
return 0; return 0;
} }
else if(G.qual==LR_ALTKEY) { else if(G.qual==LR_ALTKEY) {
if(curarea->spacetype!=SPACE_TEXT) {
BIF_undo_menu(); BIF_undo_menu();
return 0; return 0;
} }
} }
}
break; break;
case WKEY: case WKEY: