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

RE: [XaraXtreme-dev] Text undo broken



Charles,

I've fixed the bug Martin found (in both codebases). I doubt whether it
will have any effect on the other problems you mention but:
* Wrong font after pasting text is another caret-attributes related
problem
* Showing "<multiple>" for selected regions that are apparently one font
is almost certainly a caret-attributes related problem
* Paste attributes not working could actually be another
caret-attributes problem, thinking about it.
* Pasting text from outside the app not using the current text
attributes is a longstanding bug
* I'm not sure about select all reporting incorrect attrs - I can't see
this going wrong yet.

BTW: I can't find the paste attributes bug in Bugzilla - I would expect
something that bad to be P1 on my list...

Phil 

> -----Original Message-----
> From: owner-dev@xxxxxxxxxxxxxxxx 
> [mailto:owner-dev@xxxxxxxxxxxxxxxx] On Behalf Of Charles Moir
> Sent: 20 July 2006 10:57
> To: dev@xxxxxxxxxxxxxx
> Subject: RE: [XaraXtreme-dev] Text undo broken
> 
> Don't know if it's a related but there are a number of 
> outstanding issues relating to text attributes not working. 
> E.g. copy / paste attributes barely works on text objects. If 
> you paste text it comes in the wrong font. If you type after 
> pasting it's in the wrong font. If you select regions of text 
> that are a single font it often says 'multiple'
> fonts are applied. Select all never shows the correct 
> attributes. So generally speaking attributes and text seem 
> quite broken in a number of ways. Could this be because of 
> attribute optimisation not working?
> 
> Charles
> 
> > -----Original Message-----
> > From: owner-dev@xxxxxxxxxxxxxxxx
> > [mailto:owner-dev@xxxxxxxxxxxxxxxx] On Behalf Of Phil Martin
> > Sent: 20 July 2006 10:51
> > To: dev@xxxxxxxxxxxxxx
> > Subject: 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
> > > 
> > > 
> > 
>