On Tue, Aug 28, 2007 at 10:53:09PM +0200, Abdelrazak Younes wrote:
> Martin Vermeer wrote:
> >On Tue, Aug 28, 2007 at 04:39:47PM +0000, [EMAIL PROTECTED] wrote:
> >  
> >>Author: younes
> >>Date: Tue Aug 28 18:39:46 2007
> >>New Revision: 19859
> >>
> >>URL: http://www.lyx.org/trac/changeset/19859
> >>Log:
> >>We are not forced to redraw the row each time the cursor is moved.
> >>
> >>* TextMetrics.cpp: CursorOnRow() removed.
> >>* TextMetrics::drawParagraph() do not check cursor position.
> >>    
> >After a long journey through the desert, got it rebuilt and confirmed
> >what the reason was that 'cursor_on_row' was needed in the first place.
> >Just turn change tracking on and try to delete characters from a row.
> >Neither the row signature nor its metric changes... just some black 
> >characters turning blue. And after this patch, _this does not show_, as
> >the row isn't refreshed anymore.
> >  
> Ah, OK thanks for the hint. I knew there was a reason but I also knew it 
> was wrong to do this checking,
> 
> >If you don't want cursor_on_row back, consider making the row signature
> >sensitive to change tracking.
> >  
> Yes, that's the proper solution even though I am not sure I can 
> understand the change tracking code...

You don't have to... just make sure that the change tracking status of 
every character is included in the CRC computation formula.

Note BTW that also underbar (from the text settings dialog) changes the
text appearance without changing the metric... currently it doesn't cause
problems but that might change. You should catch all these cases.

This CRC thing was at the time considered rather a kludge ;-/

> FYI, I want drawing to be as dumb as possible; I want everything screen 
> related to be decided at metrics update time. That's where I am heading 
> with these cleanups. I believe we won't need the singlePar optimisation 
> anymore when I'm done because every ParagraphMetrics will know exactly 
> which row needs to be redrawn.

OK, I assume you know what you're doing ("singleRow"?)

- Martin
 

Reply via email to