mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 06:28:54 +00:00
(_insertionPointRectForCharacterIndex:textContainer:): Use
default font height for insertion point height if there is no characters. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24571 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
02beced9a5
commit
f8cc62e978
1 changed files with 3 additions and 3 deletions
|
@ -808,12 +808,12 @@ has the same y origin and height as the line frag rect it is in.
|
|||
}
|
||||
glyph_index = [self numberOfGlyphs] - 1;
|
||||
if (glyph_index == (unsigned int)-1)
|
||||
{
|
||||
/* No information is available. The best we can do is guess. */
|
||||
{ /* No information is available. Get default font height. */
|
||||
NSFont *f = [_typingAttributes objectForKey:NSFontAttributeName];
|
||||
|
||||
/* will be -1 if there are no text containers */
|
||||
*textContainer = num_textcontainers - 1;
|
||||
return NSMakeRect(1, 1, 1, 15);
|
||||
return NSMakeRect(0, 0, 1, [f boundingRectForFont].size.height);
|
||||
}
|
||||
fraction_through = 1.0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue