adium-1.4 3287:22fb5f71ee72: Noted in `AIVariableHeightOutlineVi...

commits at adium.im commits at adium.im
Mon Nov 22 03:00:49 UTC 2010


details:	http://hg.adium.im/adium-1.4/rev/22fb5f71ee72
revision:	3287:22fb5f71ee72
author:		Evan Schoenberg
date:		Sun Nov 21 21:00:40 2010 -0600

Noted in `AIVariableHeightOutlineView`'s header that _ai_drawRow:clipRect: is a correct drawRow:clipRect: override point, and then followed my own directions in `AIVariableHeightFlexibleColumnsOutlineView`. Fixes drawing in the Events tables. Fixes #14629

diffs (47 lines):

diff -r 774f4e606ea0 -r 22fb5f71ee72 Frameworks/AIUtilities Framework/Source/AIVariableHeightFlexibleColumnsOutlineView.m
--- a/Frameworks/AIUtilities Framework/Source/AIVariableHeightFlexibleColumnsOutlineView.m	Sun Nov 21 18:42:56 2010 -0600
+++ b/Frameworks/AIUtilities Framework/Source/AIVariableHeightFlexibleColumnsOutlineView.m	Sun Nov 21 21:00:40 2010 -0600
@@ -34,11 +34,11 @@
 }
 
 #pragma mark Drawing
-- (void)drawRow:(NSInteger)row clipRect:(NSRect)rect
+- (BOOL)_ai_drawRow:(NSInteger)row clipRect:(NSRect)rect;
 {
 	if (row >= 0 && row < [self numberOfRows]) { //Somebody keeps calling this method with row = numberOfRows, which is wrong.		
 		if (NSIntersectsRect([self rectOfRow:row], rect) == FALSE)
-			return;
+			return NO;
 
 		NSArray		*tableColumns = [self tableColumns];
 		id			item = [self itemAtRow:row];
@@ -126,6 +126,8 @@
 			}
 		}
 	}
+	
+	return YES;
 }
 
 @end
diff -r 774f4e606ea0 -r 22fb5f71ee72 Frameworks/AIUtilities Framework/Source/AIVariableHeightOutlineView.h
--- a/Frameworks/AIUtilities Framework/Source/AIVariableHeightOutlineView.h	Sun Nov 21 18:42:56 2010 -0600
+++ b/Frameworks/AIUtilities Framework/Source/AIVariableHeightOutlineView.h	Sun Nov 21 21:00:40 2010 -0600
@@ -77,6 +77,17 @@
 @interface AIVariableHeightOutlineView (AIVariableHeightOutlineViewAndSubclasses)
 - (void)resetRowHeightCache;
 - (void)updateRowHeightCache;
+/*!
+ * @brief Row drawing routine
+ *
+ * Subclasses should implement this rather than drawRow:clipRect: to override drawing.
+ *
+ * AIVariableHeightOutlineView calls this as part of its drawRow:clipRect: implementation, and some drawing operations
+ * may *not* call drawRow:clipRect: at all but rather call this method only.
+ *
+ * @result YES if the row was drawn; NO if the row was not drawn because it is below the clipping rect
+ */
+- (BOOL)_ai_drawRow:(NSInteger)row clipRect:(NSRect)rect;
 @end
 
 @interface NSObject (AIVariableHeightGridSupport)




More information about the commits mailing list