mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-08 19:57:14 +00:00
Revert "Merge branch 'outlineViewDisclosureSelectedThemestate' of https://github.com/BlairDuncan/cappuccino into pr-1917"
This reverts commit345a54e8c9, reversing changes made to21301cae21. 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:
@@ -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];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user