mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
* Source/NSTextView.m (-readSelectionFromPasteboard:type:): Fix
potential memory leak for colour pasting. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29992 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b81434b7d0
commit
8f43eb6c4e
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-03-17 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTextView.m (-readSelectionFromPasteboard:type:): Fix
|
||||
potential memory leak for colour pasting.
|
||||
|
||||
2010-03-16 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSSliderCell.m:
|
||||
|
|
|
@ -2999,7 +2999,7 @@ Scroll so that the beginning of the range is visible.
|
|||
return available != nil;
|
||||
}
|
||||
else
|
||||
return NO;
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (sel_eq(action, @selector(selectAll:))
|
||||
|
@ -4606,14 +4606,14 @@ right.)
|
|||
{
|
||||
/* This is an attribute change, so we use a different range. */
|
||||
NSRange aRange = [self rangeForUserCharacterAttributeChange];
|
||||
NSColor *color = [NSColor colorFromPasteboard: pboard];
|
||||
NSMutableDictionary *d = [[self typingAttributes] mutableCopy];
|
||||
|
||||
|
||||
if (aRange.location != NSNotFound &&
|
||||
[self shouldChangeTextInRange: aRange
|
||||
replacementString: nil])
|
||||
{
|
||||
NSColor *color = [NSColor colorFromPasteboard: pboard];
|
||||
NSMutableDictionary *d = [[self typingAttributes] mutableCopy];
|
||||
|
||||
[self setTextColor: color range: aRange];
|
||||
[d setObject: color forKey: NSForegroundColorAttributeName];
|
||||
[self setTypingAttributes: d];
|
||||
|
|
Loading…
Reference in a new issue