Permalink
Browse files

Add check to make sure it's not a scroll bar, this may not be needed,…

… but can't do any harm?
  • Loading branch information...
1 parent 991343a commit 6ebd425e5e69ece2876325e5b71df3414db530fd @danielctull committed Oct 24, 2010
Showing with 5 additions and 4 deletions.
  1. +5 −4 DTGridView/DTGridView.m
View
@@ -201,12 +201,13 @@ - (void)addCellWithInfo:(NSObject<DTGridViewCellInfoProtocol> *)info {
[self insertSubview:cell atIndex:0];
- // remove any existing view at this frame
+ // remove any existing view at this frame
for (UIView *v in self.subviews) {
- if (v.frame.origin.x == cell.frame.origin.x &&
+ if ([v isKindOfClass:[DTGridViewCell class]] &&
+ v.frame.origin.x == cell.frame.origin.x &&
v.frame.origin.y == cell.frame.origin.y &&
- v != cell)
- {
+ v != cell) {
+
[v removeFromSuperview];
break;
}

0 comments on commit 6ebd425

Please sign in to comment.