[Bf-committers] Restored Text Undo.
Ton Roosendaal
ton at blender.org
Wed Nov 10 12:29:57 CET 2004
Hi,
>> 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.
Yes, but the mess then is together where it belongs. The queue system
is polluted quite some by the textwindow and scriptwindow, rather have
it together.
> 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.
Thats a different issue, and certainly not solved with your patch.
Excluding the currently being edited text block from global undo will
involve hackish surgery in the file load/save routines, which is not
wise to even attempt before release.
I will make sure this exception is documented in the release notes;
it's the first release with a global undo, so it's acceptable to focus
first on verifying it works stable in general, and finetune details -
also related to editmode undo - later on.
> 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.
Maximized mode is supported in Windows only, and hacked in quite ugly,
I don't mind removing the feature... or maybe someone likes to maintain
the code?
-Ton-
>
>> (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
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation ton at blender.org
http://www.blender.org
More information about the Bf-committers
mailing list