mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 22:17:39 +00:00
(-drawBackgroundForGlyphRange:atPoint:): Check that a range has a background color before checking that there are rectangles for it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16061 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4c0d68496c
commit
5e1795f0b9
2 changed files with 11 additions and 11 deletions
|
@ -4,7 +4,7 @@
|
|||
Fix handling of the case where the exact glyph is found during
|
||||
the binary search.
|
||||
|
||||
* Source/NSLayoutManager.m (-drawGlyphsForGlyphRange:atPoint:):
|
||||
* Source/NSLayoutManager.m (-drawBackgroundForGlyphRange:atPoint:):
|
||||
Check that a range has a background color before checking that there
|
||||
are rectangles for it (since ranges practically always have
|
||||
rectangles, and very rarely a background color).
|
||||
|
|
|
@ -1188,17 +1188,17 @@ container
|
|||
if (NSMaxRange(r) > NSMaxRange(range))
|
||||
r.length = NSMaxRange(range) - r.location;
|
||||
|
||||
rects = [self rectArrayForGlyphRange: r
|
||||
withinSelectedGlyphRange: NSMakeRange(NSNotFound, 0)
|
||||
inTextContainer: textContainer
|
||||
rectCount: &count];
|
||||
|
||||
if (count)
|
||||
color = [_textStorage attribute: NSBackgroundColorAttributeName
|
||||
atIndex: char_pos
|
||||
effectiveRange: NULL];
|
||||
if (color)
|
||||
{
|
||||
color = [_textStorage attribute: NSBackgroundColorAttributeName
|
||||
atIndex: char_pos
|
||||
effectiveRange: NULL];
|
||||
if (color)
|
||||
rects = [self rectArrayForGlyphRange: r
|
||||
withinSelectedGlyphRange: NSMakeRange(NSNotFound, 0)
|
||||
inTextContainer: textContainer
|
||||
rectCount: &count];
|
||||
|
||||
if (count)
|
||||
{
|
||||
if (last_color != color)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue