[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-dev] Text undo broken



In message <200607191444.k6JEimAL008812@xxxxxxxxxxxxxxxx> you wrote:

> Commit by  : phil
> Repository : xara
> Revision   : 1478
> Date       : Wed Jul 19 15:44:48 BST 2006
> 
> Changed paths:
>    M /Trunk/XaraLX/Kernel/nodetext.cpp
> 
> Removed incorrect temporary bodge in
> CaretNode::DiscardsAttributeChildren and added missing comment. Both
> these things were out of line with the Xtreme source...

> + Notes:  Phil, 24/09/2005
> + The usage of this function has changed subtly today. It used to
> + prevent both attribute optimisation and undo recording on Caret
> + nodes. As of today it just prevents undo recording - attribute
> + optimisation goes ahead like normal on Caret nodes so that they
> + behave more consistently.

Unfortunately, that change breaks more things than it fixes. :-( While 
it does fix bug #1283 it ruins other parts of text undo. For instance, 
applying a line level attribute (say, justification) while there is no 
selection (i.e., with the cursor in a paragraph) does not generate any 
Undo information any more. Reverting the change fixes normal undo 
operation (but, obviously, causes bug #1283 to appear again).

Maybe the above was not the only thing being out of line with the 
Xtreme source? The comment associated with the missing change 
indicates some change of functionality elsewhere. If the change was 
missing in one place, I wonder whether the other, related changes were 
maybe missed out, too? One route of investigation would be to compare 
the various uses of DiscardsAttributeChildren in our code with those 
in the Xtreme code.

Martin