bug-gnustep
[Top][All Lists]
Advanced

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

Re: GSSimpleLayoutManager line range problem


From: Nicola Pero
Subject: Re: GSSimpleLayoutManager line range problem
Date: Fri, 22 Mar 2002 11:47:06 +0000 (GMT)

> Hi,
> 
> It seems that under some circumstances (seemed to happen with windows
> with really small width) in [GSSimpleLayoutManager -textStorage: edited:
> range: changeInLength: invalidatedRange:], the call to sizeToFit or
> invalidateTextContainerOrigin ends up causing additional calls to
> rebuildForRange:... (four when I've tested), and the further rebuilds
> cause the number of lines to decrease, and thus the line range used in
> setNeedsDisplayForLineRange:... won't be valid. This causes an exception
> in setNeedsDisplayForLineRange:...
> 
> I've attached a patch that makes setNeedsDisplayForLineRange return if
> the line range is too large. I think this is correct if the other calls
> make sure that they update the display properly. However, I haven't
> investigated why there are so many calls to rebuildForRange:...

Thanks - that code looks like a mess :-) - we would need to investigate
... possibly better simply rewrite.

In the meanwhile, I added your patch (sligthly modified) as the check it
provides is better and at least we don't crash (I couldn't reproduce the
crash though).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]