Try to stop redundant redars of the NSBrowser, by only getting the

ownership of the titlecell during drawing.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27284 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2008-12-12 20:16:14 +00:00
parent 05bec8c892
commit 655fa58b2c
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2008-12-12 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSBrowser.m (-drawTitle:inRect:ofColumn:, -dealloc):
Replaced the last fix here with a slightly better one that removes
the ownership of the shared titlecell as soon as it isn't needed
any more. The old code caused redundant redraws.
2008-12-12 02:04-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Headers/Additions/GNUstepGUI/GSNibLoading.h: Added new method

View file

@ -1455,9 +1455,10 @@ static NSTextFieldCell *titleCell;
if (!_isTitled || !NSBR_COLUMN_IS_VISIBLE(column))
return;
[titleCell setControlView: self];
// [titleCell setControlView: self];
[titleCell setStringValue: title];
[titleCell drawWithFrame: aRect inView: self];
[titleCell setControlView: nil];
}
/** <p>Returns the height of column titles. The Nextish look returns 21.</p>
@ -3228,4 +3229,9 @@ static NSTextFieldCell *titleCell;
}
}
- (void) setNeedsDisplayInRect: (NSRect)invalidRect
{
[super setNeedsDisplayInRect: invalidRect];
}
@end