Revert "Merge branch 'outlineViewDisclosureSelectedThemestate' of https://github.com/BlairDuncan/cappuccino into pr-1917"

This reverts commit 345a54e8c9, reversing
changes made to 21301cae21.

This commit is reverted because it causes a non obvious crash when selecting the latest row of a CPOutlineView.

The crash is visible in Tests/Manual/CPOutlineViewTest
This commit is contained in:
Antoine Mercadal
2013-05-06 15:07:26 -07:00
parent e0d33a8e3f
commit eb04174e68
+6 -7
View File
@@ -721,17 +721,16 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
/*!
@ignore
Select or deselect rows, this is overridden because we need to change the color of the outline control.
Select or deselect rows, this is overridden because we need to change the color or the outline control.
*/
- (void)_setSelectedRowIndexes:(CPIndexSet)rows
- (void)_performSelection:(BOOL)select forRow:(CPInteger)rowIndex context:(id)context
{
if (_disclosureControlsForRows.length)
[[_disclosureControlsForRows objectsAtIndexes:_selectedRowIndexes] makeObjectsPerformSelector:@selector(unsetThemeState:) withObject:CPThemeStateSelected];
[super _performSelection:select forRow:rowIndex context:context];
[super _setSelectedRowIndexes:rows];
var control = _disclosureControlsForRows[rowIndex],
selector = select ? @"setThemeState:" : @"unsetThemeState:";
if (_disclosureControlsForRows.length)
[[_disclosureControlsForRows objectsAtIndexes:_selectedRowIndexes] makeObjectsPerformSelector:@selector(setThemeState:) withObject:CPThemeStateSelected];
[control performSelector:CPSelectorFromString(selector) withObject:CPThemeStateSelected];
}
/*!