Skip to content

Commit

Permalink
Fixed check for duplicate cells being added to the reused cells list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Dovey committed Oct 26, 2010
1 parent 1522816 commit cf2dc26
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Classes/AQGridView.m
Original file line number Diff line number Diff line change
Expand Up @@ -538,18 +538,18 @@ - (void) enqueueReusableCells: (NSArray *) reusableCells
{
for ( AQGridViewCell * cell in reusableCells )
{
if ( [_visibleCells containsObject: cell] )
{
NSLog( @"Warning: tried to add duplicate gridview cell" );
continue;
}
NSMutableSet * reuseSet = [_reusableGridCells objectForKey: cell.reuseIdentifier];
if ( reuseSet == nil )
{
reuseSet = [[NSMutableSet alloc] initWithCapacity: 32];
[_reusableGridCells setObject: reuseSet forKey: cell.reuseIdentifier];
[reuseSet release];
}
else if ( [reuseSet member: cell] == cell )
{
NSLog( @"Warning: tried to add duplicate gridview cell" );
continue;
}

[reuseSet addObject: cell];
}
Expand Down

0 comments on commit cf2dc26

Please sign in to comment.