Fix various issues when drawing controls with edited cells. This

includes a fix for the problem of properly resizing and redrawing the
editor when the cell is resized or moved during editing (bug #22678).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29133 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
wlux 2009-12-17 01:03:07 +00:00
parent 82aee08d88
commit 68b0f819f2
7 changed files with 243 additions and 149 deletions

View file

@ -225,15 +225,20 @@
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
{
NSRect titleRect;
if (_cell.in_editing)
[self _drawEditorWithFrame: cellFrame inView: controlView];
else
{
NSRect titleRect;
/* Make sure we are a text cell; titleRect might return an incorrect
rectangle otherwise. Note that the type could be different if the
user has set an image on us, which we just ignore (OS X does so as
well). */
_cell.type = NSTextCellType;
titleRect = [self titleRectForBounds: cellFrame];
[[self _drawAttributedString] drawInRect: titleRect];
/* Make sure we are a text cell; titleRect might return an incorrect
rectangle otherwise. Note that the type could be different if the
user has set an image on us, which we just ignore (OS X does so as
well). */
_cell.type = NSTextCellType;
titleRect = [self titleRectForBounds: cellFrame];
[[self _drawAttributedString] drawInRect: titleRect];
}
}
/*