diff --git a/ChangeLog b/ChangeLog index b89a01e2d..d3efc81ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-05-22 Fred Kiefer + + * Source/NSView.m (-display) + * Source/NSCell.m (-drawWithFrame:inView:) + * Source/NSBrowserCell.m (-drawWithFrame:inView:) + * Source/NSImageCell.m (-drawWithFrame:inView:) + * Source/NSMenuItemCell.m (-drawWithFrame:inView:) + * Source/NSTableHeaderCell.m (-drawWithFrame:inView:) + Removed check for window existence. This should already have been + checked by a surrounding canDraw call. Fixes bug #13140. + 2005-05-22 Fred Kiefer * Source/NSComboBox.m (-cellSize) Added simple implementation of diff --git a/Source/NSBrowserCell.m b/Source/NSBrowserCell.m index 5eb53af3d..28ed83cee 100644 --- a/Source/NSBrowserCell.m +++ b/Source/NSBrowserCell.m @@ -235,10 +235,6 @@ static NSFont *_leafFont; NSColor *backColor; NSWindow *cvWin = [controlView window]; - - if (!cvWin) - return; - if (_cell.is_highlighted || _cell.state) { backColor = [self highlightColorInView: controlView]; diff --git a/Source/NSCell.m b/Source/NSCell.m index eaaf8ff2c..2c1936547 100644 --- a/Source/NSCell.m +++ b/Source/NSCell.m @@ -1658,9 +1658,6 @@ static NSColor *shadowCol; */ - (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView { - if (![controlView window]) - return; - cellFrame = [self drawingRectForBounds: cellFrame]; //FIXME: Check if this is also neccessary for images, @@ -1717,7 +1714,7 @@ static NSColor *shadowCol; - (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView { // do nothing if cell's frame rect is zero - if (NSIsEmptyRect(cellFrame) || ![controlView window]) + if (NSIsEmptyRect(cellFrame)) return; // draw the border if needed diff --git a/Source/NSImageCell.m b/Source/NSImageCell.m index 1d7bfbf25..308e65aeb 100644 --- a/Source/NSImageCell.m +++ b/Source/NSImageCell.m @@ -124,7 +124,7 @@ NSDebugLLog(@"NSImageCell", @"NSImageCell -drawWithFrame"); // do nothing if cell's frame rect is zero - if (NSIsEmptyRect(cellFrame) || ![controlView window]) + if (NSIsEmptyRect(cellFrame)) return; // draw the border if needed @@ -215,7 +215,7 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect) NSDebugLLog(@"NSImageCell", @"NSImageCell drawInteriorWithFrame called"); - if (![controlView window] || !_cell_image) + if (!_cell_image) return; // leave room for the frame diff --git a/Source/NSMenuItemCell.m b/Source/NSMenuItemCell.m index 0641914a1..11a5f314f 100644 --- a/Source/NSMenuItemCell.m +++ b/Source/NSMenuItemCell.m @@ -503,10 +503,6 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */ if (NSIsEmptyRect(cellFrame)) return; - // Do nothing if the window is deferred - if ([[controlView window] gState] == 0) - return; - // Draw the border if needed [self drawBorderAndBackgroundWithFrame: cellFrame inView: controlView]; diff --git a/Source/NSTableHeaderCell.m b/Source/NSTableHeaderCell.m index 7f9701005..57a105aa7 100644 --- a/Source/NSTableHeaderCell.m +++ b/Source/NSTableHeaderCell.m @@ -59,7 +59,7 @@ static NSColor *clearCol = nil; NSRect interiorFrame = NSMakeRect (cellFrame.origin.x-1, cellFrame.origin.y-1, cellFrame.size.width+2, cellFrame.size.height+2); - if (NSIsEmptyRect (cellFrame) || ![controlView window]) + if (NSIsEmptyRect (cellFrame)) return; if (_cell.is_highlighted == YES) diff --git a/Source/NSView.m b/Source/NSView.m index 3667c56e3..eb3ea10a0 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -1757,14 +1757,7 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri - (void) display { - if (_window != nil) - { - if (_coordinates_valid == NO) - { - [self _rebuildCoordinates]; - } - [self displayRect: _visibleRect]; - } + [self displayRect: [self visibleRect]]; } - (void) displayIfNeeded