From 7fba1bb097f48528ccc29661f00bb3672c560a07 Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Sat, 30 Sep 2000 23:12:42 +0000 Subject: [PATCH] Implemented [firstTextView]. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7675 72102866-910b-0410-8b05-ffd578937521 --- Source/NSLayoutManager.m | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Source/NSLayoutManager.m b/Source/NSLayoutManager.m index 93bcdf28d..b95bead21 100644 --- a/Source/NSLayoutManager.m +++ b/Source/NSLayoutManager.m @@ -327,7 +327,16 @@ static NSComparisonResult aSort(GSIArrayItem i0, GSIArrayItem i1) // - (void) setTextStorage: (NSTextStorage*)aTextStorage { + unsigned length = [aTextStorage length]; + NSRange aRange = NSMakeRange(0, length); + ASSIGN(_textStorage, aTextStorage); + // force complete re - layout + [self textStorage: aTextStorage + edited: NSTextStorageEditedCharacters | NSTextStorageEditedAttributes + range: aRange + changeInLength: length + invalidatedRange: aRange]; } - (NSTextStorage*) textStorage @@ -932,7 +941,7 @@ be redrawn when a range of glyphs changes. */ if (_usesScreenFonts) return originalFont; - // FIXME: Should check if any NSTextView is scalled or rotated + // FIXME: Should check if any NSTextView is scaled or rotated replaceFont = [originalFont screenFont]; if (replaceFont != nil) @@ -969,7 +978,7 @@ be redrawn when a range of glyphs changes. */ - (NSTextView*) firstTextView { - return NULL; + return [[_textContainers objectAtIndex: 0] textView]; } - (NSTextView*) textViewForBeginningOfSelection