fixed reordering column with a restriction on a targeted column

This commit is contained in:
Christophe Serafin committed 2013-03-08 18:11:27 +01:00
1 parent ae4c77a6d4
commit 152fd66bbe
2 files changed
+6 -6

No files matched your search

+6 -3
View File
@@ -503,9 +503,12 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
- (void)_moveColumn:(int)aFromIndex toColumn:(int)aToIndex
{
[_tableView moveColumn:aFromIndex toColumn:aToIndex];
_activeColumn = aToIndex;
_pressedColumn = _activeColumn;
if ([_tableView _shouldReorderColumn:aFromIndex toColumn:aToIndex])
{
[_tableView moveColumn:aFromIndex toColumn:aToIndex];
_activeColumn = aToIndex;
_pressedColumn = _activeColumn;
}
}
- (void)draggedView:(CPView)aView beganAt:(CGPoint)aPoint
-3
View File
@@ -1027,9 +1027,6 @@ NOT YET IMPLEMENTED
if (fromIndex === toIndex)
return;
if (![self _shouldReorderColumn:fromIndex toColumn:toIndex])
return;
if (_dirtyTableColumnRangeIndex < 0)
_dirtyTableColumnRangeIndex = MIN(fromIndex, toIndex);
else