forked from bartvdbraak/blender
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:
parent
f33f2abe39
commit
63d81be035
@ -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,8 +950,10 @@ int blenderqread(unsigned short event, short val)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if(G.qual==LR_ALTKEY) {
|
else if(G.qual==LR_ALTKEY) {
|
||||||
BIF_undo_menu();
|
if(curarea->spacetype!=SPACE_TEXT) {
|
||||||
return 0;
|
BIF_undo_menu();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user