mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 20:30:37 +00:00
More text fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4642 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
aa3258aa39
commit
efcfcbe8cc
3 changed files with 43 additions and 2 deletions
|
@ -146,12 +146,10 @@
|
|||
|
||||
/* We override NSView's setNeedsDisplayInRect: */
|
||||
|
||||
/*
|
||||
- (void)setNeedsDisplayInRect:(NSRect)aRect
|
||||
{
|
||||
[self setNeedsDisplayInRect:aRect avoidAdditionalLayout:NO];
|
||||
}
|
||||
*/
|
||||
|
||||
- (BOOL)shouldDrawInsertionPoint
|
||||
{
|
||||
|
@ -915,12 +913,19 @@ container, returning the modified location. */
|
|||
|
||||
- (void)insertText:(NSString *)aString
|
||||
{
|
||||
NSLog(@"%@", aString);
|
||||
|
||||
if (![aString isKindOfClass:[NSAttributedString class]])
|
||||
aString = [[[NSAttributedString alloc] initWithString:aString
|
||||
attributes:[self typingAttributes]] autorelease];
|
||||
|
||||
[textStorage replaceCharactersInRange:[self selectedRange]
|
||||
withAttributedString:(NSAttributedString *)aString];
|
||||
|
||||
[self setSelectedRange:NSMakeRange([self
|
||||
selectedRange].location+[aString length],0)];
|
||||
|
||||
NSLog(@"%@", [textStorage string]);
|
||||
}
|
||||
|
||||
- (void)drawRect:(NSRect)aRect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue