diff options
author | Ton Roosendaal <ton@blender.org> | 2004-10-29 19:00:11 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-10-29 19:00:11 +0400 |
commit | 63d81be0357b855a1de514769d581c2b07af59c0 (patch) | |
tree | 37a5d0221f2b4ef26d987b1118b5d38af13d1627 | |
parent | f33f2abe39cb0a6f99c9e7e59858d5d95f7735d5 (diff) |
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.
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 1 | ||||
-rw-r--r-- | source/blender/src/toets.c | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 6f46454d169..9192a620025 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2753,6 +2753,7 @@ void lib_link_screen_restore(Main *newmain, char mode, Scene *curscene) SpaceText *st= (SpaceText *)sl; 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) { SpaceScript *sc= (SpaceScript *)sl; diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index ff8273c6d15..a7ce1eb3362 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -950,8 +950,10 @@ int blenderqread(unsigned short event, short val) return 0; } else if(G.qual==LR_ALTKEY) { - BIF_undo_menu(); - return 0; + if(curarea->spacetype!=SPACE_TEXT) { + BIF_undo_menu(); + return 0; + } } } break; |