mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 21:17:03 +00:00
Fixed: the "fix for column reordering with hidden columns" sometimes caused the table view to try to remove nonexistent data views and crash. The fix is to consider a nonexistent data view already removed and just move on.
This commit is contained in:
+10
-5
@@ -2277,9 +2277,14 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
|
||||
for (; rowIndex < rowsCount; ++rowIndex)
|
||||
{
|
||||
var row = rowArray[rowIndex],
|
||||
dataView = [_dataViewsForTableColumns[tableColumnUID] objectAtIndex:row];
|
||||
dataViews = _dataViewsForTableColumns[tableColumnUID];
|
||||
|
||||
[_dataViewsForTableColumns[tableColumnUID] replaceObjectAtIndex:row withObject:nil];
|
||||
if (!dataViews || row >= dataViews.length)
|
||||
continue;
|
||||
|
||||
var dataView = [dataViews objectAtIndex:row];
|
||||
|
||||
[dataViews replaceObjectAtIndex:row withObject:nil];
|
||||
|
||||
[self _enqueueReusableDataView:dataView];
|
||||
}
|
||||
@@ -3722,14 +3727,14 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
|
||||
CGContextSetStrokeColor(context, _lineColor);
|
||||
|
||||
var points = [
|
||||
_CGPointMake(0.5, 0),
|
||||
_CGPointMake(0.5, 0),
|
||||
_CGPointMake(0.5, aRect.size.height)
|
||||
];
|
||||
|
||||
CGContextStrokeLineSegments(context, points, 2);
|
||||
|
||||
|
||||
points = [
|
||||
_CGPointMake(aRect.size.width - 0.5, 0),
|
||||
_CGPointMake(aRect.size.width - 0.5, 0),
|
||||
_CGPointMake(aRect.size.width - 0.5, aRect.size.height)
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user