diff --git a/lib/UIKit/TUITableView.h b/lib/UIKit/TUITableView.h index 681b4a16..c3a31704 100644 --- a/lib/UIKit/TUITableView.h +++ b/lib/UIKit/TUITableView.h @@ -86,7 +86,7 @@ typedef NS_ENUM(NSInteger, TUITableViewInsertionMethod) { NSMutableArray * _arrayOfSelectedIndexes; BOOL _multipleSelectionKeyIsPressed; BOOL _extendMultipleSelectionKeyIsPressed; - NSUInteger _iterationCount; +// NSUInteger _iterationCount; NSIndexPath * _selectedIndexPath; NSIndexPath * _indexPathShouldBeFirstResponder; diff --git a/lib/UIKit/TUITableView.m b/lib/UIKit/TUITableView.m index e5e62cea..a30f9814 100644 --- a/lib/UIKit/TUITableView.m +++ b/lib/UIKit/TUITableView.m @@ -1116,7 +1116,7 @@ - (void)_makeRowAtIndexPathFirstResponder:(NSIndexPath *)indexPath - (void)justSelectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(TUITableViewScrollPosition)scrollPosition { [self selectRowAtIndexPath:indexPath animated:animated scrollPosition:scrollPosition]; - _iterationCount = 0; +// _iterationCount = 0; } @@ -1129,13 +1129,13 @@ - (void)selectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated sc */ NSIndexPath *oldIndexPath = [self indexPathForSelectedRow]; - if([indexPath isEqual:oldIndexPath] && _iterationCount != 0) - { - _iterationCount = 0; - } - else if (_iterationCount == 0) - { - +// if([indexPath isEqual:oldIndexPath] && _iterationCount != 0) +// { +// _iterationCount = 0; +// } +// else if (_iterationCount == 0) +// { + /*! * check for the current event only if the multiple selection * is enabled to avoid uselesss computations. @@ -1150,8 +1150,8 @@ - (void)selectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated sc // grab the tableview cell TUITableViewCell *cell = [self cellForRowAtIndexPath:indexPath]; // may be nil - _iterationCount++; - +// _iterationCount++; + // if it allows multiple selection if (_allowsMultipleSelection) { @@ -1187,7 +1187,7 @@ - (void)selectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated sc if([self.delegate respondsToSelector:@selector(tableView:didSelectRowAtIndexPath:)]){ [self.delegate tableView:self didSelectRowAtIndexPath:indexPath]; } - } +// } NSResponder *firstResponder = [self.nsWindow firstResponder]; if(firstResponder == self || firstResponder == [self cellForRowAtIndexPath:oldIndexPath]) { @@ -1292,7 +1292,7 @@ - (BOOL)performKeyAction:(NSEvent *)event } } - _iterationCount = 0; +// _iterationCount = 0; return [NSIndexPath indexPathForRow:row inSection:section]; }); @@ -1319,7 +1319,7 @@ - (BOOL)performKeyAction:(NSEvent *)event } } - _iterationCount = 0; +// _iterationCount = 0; return [NSIndexPath indexPathForRow:row inSection:section]; }); diff --git a/lib/UIKit/TUITableViewCell.m b/lib/UIKit/TUITableViewCell.m index 0b0266d2..1328f11f 100644 --- a/lib/UIKit/TUITableViewCell.m +++ b/lib/UIKit/TUITableViewCell.m @@ -244,7 +244,7 @@ - (void)mouseUp:(NSEvent *)event { [self.tableView __mouseUpInCell:self offset:_mouseOffset event:event]; [self.nsWindow makeFirstResponder:self.tableView]; - [self.tableView selectRowAtIndexPath:self.indexPath animated:YES scrollPosition:TUITableViewScrollPositionNone]; +// [self.tableView selectRowAtIndexPath:self.indexPath animated:YES scrollPosition:TUITableViewScrollPositionNone]; [super mouseUp:event]; // We were selected, so we are no longer highlighted.