[Bf-committers] Restored Text Undo.
joeedh
joeeagar at prodigy.net
Wed Nov 10 11:47:17 CET 2004
Ton Roosendaal wrote:
> Hi,
>
> A better description of the problem/solution would be;
>
> With a mouse pointer in Text Window, pressing hotkeys for global undo
> should call regular text window undo.
>
> The comment in the code;
>
>>> /*text does it's undo automatically, so we don't need any undo
>>> pushes*/
>>
>
> Is incorrect too. It is more like: /* use local textwindow undo
> instead */
> Futher it is better to go to the source of the problem, which is in
> the global hotkey handling, in toets.c. Saves coding, and much
> cleaner; see patch below:
But this ruins BIF_undo unification.
And, no, that's not the source of the problem, the real problem is that
global undo affects text objects (ok buffers) which drives me INSANE.
All attempts of mine to exclude them have thus far failed, or destroyed
all scriptlinks.
Also, it seems as if all your doing is simply not calling BIF_undo if
the mouse cursor is inside the text window, so I commented out the
txt_do_undo calls (which should have the same effect) and it didn't work
(e.g. the text window didn't catch the keyboard event).
And BTW, whenever I start a new cvs build, blender opens up in
full-screen mode but with a titlebar (very annoying). So I have to go
to window mode, then back to maximized/full-screen mode.
> (BTW: there already textwindow and scriptwindow exceptions exist,
> this way also a running scriptwindow will not do a global undo, which
> is OK for now)
>
> -Ton-
>
>
> --- toets.c 29 Oct 2004 15:00:11 -0000 1.44
> +++ toets.c 10 Nov 2004 09:57:11 -0000
> @@ -987,16 +987,20 @@
> }
> break;
> case YKEY: // redo alternative
> - if(G.qual==LR_CTRLKEY) {
> - BIF_redo();
> - return 0;
> + if(textspace==0) {
> + if(G.qual==LR_CTRLKEY) {
> + BIF_redo();
> + return 0;
> + }
> }
> break;
> case ZKEY: // undo
> - if(G.qual & (LR_CTRLKEY|LR_COMMANDKEY)) { // all
> combos with ctrl/commandkey are accepted
> - if ELEM(G.qual, LR_CTRLKEY, LR_COMMANDKEY)
> BIF_undo();
> - else BIF_redo(); // all combos with ctrl is redo
> - return 0;
> + if(textspace==0) {
> + if(G.qual & (LR_CTRLKEY|LR_COMMANDKEY)) { //
> all combos with ctrl/commandkey are accepted
> + if ELEM(G.qual, LR_CTRLKEY,
> LR_COMMANDKEY) BIF_undo();
> + else BIF_redo(); // all combos with
> ctrl is redo
> + return 0;
> + }
> }
> break;
> }
> >
>
joeedh
More information about the Bf-committers
mailing list