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

RE: [XaraXtreme-dev] Text undo broken



It's a bug in both codebases.

The problem would seem to be that line level attributes are being
promoted from the caret up to its parent objects but the code that
decides whether to record undo info doesn't see that promotion - it just
sees a selected caret and drops out because we don't (can't) record undo
on carets.

Shouldn't be too difficult to fix and since it's needed in both
codebases I'll do it now (note, Neil).

Phil 

> -----Original Message-----
> From: owner-dev@xxxxxxxxxxxxxxxx 
> [mailto:owner-dev@xxxxxxxxxxxxxxxx] On Behalf Of Phil Martin
> Sent: 20 July 2006 10:01
> To: dev@xxxxxxxxxxxxxx
> Subject: Re: [XaraXtreme-dev] Text undo broken
> 
> I checked all the calls to DiscardsAttributeChildren in both 
> codebases yesterday and they all looked OK.
> 
> There are three possibilities:
> 1. LX is missing some crucial change that was made to Xtreme 
> (possible given the problem found with 
> DiscardsAttributeChildren) 2. The same problem exists in Xtreme.
> 3. It's not a bug.
> 
> I'm investigating...
> 
> Phil
> 
> On 20 Jul 2006, at 09:43, Martin Wuerthner wrote:
> 
> > 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
> 
>